Skip to content

Instantly share code, notes, and snippets.

@nathanmpark
Created October 2, 2015 05:13
Show Gist options
  • Save nathanmpark/828bc838eefb074fb300 to your computer and use it in GitHub Desktop.
Save nathanmpark/828bc838eefb074fb300 to your computer and use it in GitHub Desktop.
// Accessing JavaScript Object Properties
// Dot Notation
console.log(skateboarder.name) // Prints "Rodney Mullen" to console.
//Brackets
console.log(skateboarder[wheels]) // Prints "undefined" to console.
// The line above evaluates wheels to return "Spitfire", then return undefined as there is no property named "Spitfire".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment