Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
You basically called "the object in the object" :). So you called an object, when its not created fully. In your code just take the log and the object property call outside your object like that: let flower = { height :7, color:`white`, ltr(){ this.height +=2; } }; flower.ltr(); console.log(floower.height); And change "floower" to flower ;)
20th Apr 2019, 3:19 PM
avatarluca
avatarluca - avatar