Ci-dessous un extrait de Google Developer ConsolePourquoi typeof Object, String, Number ... -a fonction Javascript
typeof Object // type of Object is function (most confusing part).
"function" //Same fot all build-in types
Object.constructor
function Function(){[native code]}// Why not function Object()?
Object.hasOwnProperty("create") // Here, it is Object since it has property,not typeof
"true" function
dir(Object) // Again, Object is object,it has property (method)
function Object() { [native code] }
Pourquoi typeof objet n'est pas l'objet? Et pourquoi Object.constructor n'est pas une fonction Object()?
Merci MIRO