Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created July 8, 2016 02:09
Show Gist options
  • Save codecademydev/144d09dcfee8b3c03e6bc99d5cabafcc to your computer and use it in GitHub Desktop.
Save codecademydev/144d09dcfee8b3c03e6bc99d5cabafcc to your computer and use it in GitHub Desktop.
Codecademy export
var snoopy = new Object();
snoopy.species = "beagle";
snoopy.age = 10;
// save Snoopy's age and species into variables
// use dot notation for snoopy's species
var species = snoopy.species;
// use bracket notation for snoopy's age
var age = snoopy["age"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment