var name={id:"12"}
console.log(name) // logs [object Object]
But the following variations log the object correctly
//Variation 1-changing "name" to "name1"
var name1={id:"12"}
console.log(name1) // logs {id:"12"}
//Variation 2-changing "var" to "let"
let name={id:"12"}
console.log(name) // logs {id:"12"}
Why does this happen? Edit:-This is different from any other questioner-let question on stack overflow!