I'm learning javascript, I'm new to programming and i was wondering about "this".
let someObject = {
a : "happy",
b : "sad",
c : function(){
return this.a
},
d : this.a
}
someObject.c()
returns "happy" but someObject.d
returns undefined. why can't it simply assign the value of 'a' to 'd'?