var num = 1;
typeof num; //prints number
console.log(num.__proto__); //prints Number
console.log(num.__proto__.__proto__); //prints Object
When variable num is behaving like a typical Object then why number is called primitive in javascript?
var num = 1;
typeof num; //prints number
console.log(num.__proto__); //prints Number
console.log(num.__proto__.__proto__); //prints Object
When variable num is behaving like a typical Object then why number is called primitive in javascript?