Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created August 7, 2015 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/583f2757331ef2398160 to your computer and use it in GitHub Desktop.
Save chuck0523/583f2757331ef2398160 to your computer and use it in GitHub Desktop.
var obj = {
mon : 0,
tue : 1,
wed : 2,
thu : undefined,
time : {
morning : "5-11",
night : "19-22"
}
}
console.log(typeof obj); //object
console.log(typeof obj.mon); //number
console.log(typeof obj.thu); //undefined
console.log(typeof obj.time); //object
console.log(typeof obj.time.night); //string
console.log(typeof obj.toString); //function
console.log(obj.hasOwnProperty('number')); //true
console.log(obj.hasOwnProperty('boolean')); //false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment