im having a hard time understanding why type of Object and even String and other data types is a function, is it a function constructor ?
console.log(typeof Object);
// function
im having a hard time understanding why type of Object and even String and other data types is a function, is it a function constructor ?
console.log(typeof Object);
// function
Try using this syntax instead....
console.log(typeof {}); // "object"
console.log(typeof new Object); // "object"
All object type constructor functions, when initiated with the new keyword will always have a type of “object”.