Skip to content

Instantly share code, notes, and snippets.

@ruanbekker
Created April 24, 2019 05:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ruanbekker/758112f436e1d5b7203336f9906c6640 to your computer and use it in GitHub Desktop.
Java Script Cheatsheet

Arrays

Define array:

> var dict = [];

Append dictionary to array:

> dict.push({
    key:   "name",
    value: "ruan"
});

Print the array:

> console.log(dict);
[ { key: 'name', value: 'ruan' } ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment