I have a object that basically has a list of toys in it. According to w3schools.com, this keyword in a object refers to the object itself. But the following code returns undefined.
var toy = {
a:'car',
b:'bus',
c:'truck',
d:'desk',
e: this.d
};
console.log(toy.e);
Is the same thing as saying
e:toy.d
as
e:this.d?
Since this keyword refers to the toy object.