Ole Larsen

Image of a computer and a coffee cup

Check If an Object Contains a Key using Javascript

tl;dr: Method 1:  var valueForKey = “apple” in fruitPrices; The example above will store true in the variable valueForKey if the key “apple” exists in the object “fruitPrices” Method 2: var valueForKey = fruitPrices[“apple”]; In method two we will store the value of the key “apple” in the object valueForKey. You can use either of …

Check If an Object Contains a Key using Javascript Read More »

What is RAM?

What is RAM? There are typically two types of memory on a computer. There is long term memory, such as a hard drive or SSD, and then there is RAM. RAM stands for Random Access Memory and the computer can use it to quickly look up information that it needs. It is much quicker than …

What is RAM? Read More »