Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is one of the most commonly used data-structures container types that we use in Javascript. It’s a dictionary.

...

Code Block
var Cars = {type:"Fiat", model:"500", color:"white"};

Javascript object values can be anything can be stored in a Javascript variable - such as a Javascript function i.e.:

Code Block
languagejs
var APPcommands ={
   home : function(X) { console.log("Hello home "); }
};

It iterate through a Javascript object you can use:

...

languagejs

...

;

...

See https://www.w3schools.com/js/js_objects.asp