I have a variable named contact. When I used console.log(contact)
to display its contents, this is what I got:
addresss:[]
company:""
emails:[]
id:3
internet_calls:[]
lat:"10.115730000000001"
lng:"76.461445"
name:"Diji "
phones:[]
special_days:[]
timestamp:1508919658000
title:"Mr"
websites:[]
__proto__:Object
However, when I tried to check the length of the addresss field using
console.log(contact.addresss.length)
, it returned undefined
.
When I logged the object using
console.log(JSON.stringify(contact))
, the result was:
{"id":3,"title":"Mr","name":"Diji ","company":"","lat":"10.115730000000001","lng":"76.461445","timestamp":1508919658000,"phones":[],"emails":[]}
My question is, why are some properties of my object not displayed in the later log but appear in the first log?