What the Internal Property in ECMAScript is defined for ? What does the spec mean by
This specification uses various internal properties to define th
The often used example is the internal property [[prototype]], all objects have one but you can't access it directly eg.
function foo(){
this.first = "hi"
this.second = something
}
foo.prototype = {
constructor : foo,
anotherProp : "hello"
}
var obj = new foo();
console.log(obj.anotherProp); //hello
//here the runtime will look in obj for anotherProp and
//fail to find it so it will look in obj's internal property
//[[prototype]] which is pointing to the object foo.prototype
so you can access the objects that the internal property [[prototype]] is pointing to but not directly through the internal [[prototype]] property that is only for the runtime to use, not the programmer.