Why is the value of a new property is undefined in this example


#1

Hi, In this code example, bulb object is created and later I added a new property ‘color’ using reopen method with the value ‘yellow’. I thought it will be added to existing properties but it came out as undefined.

Could someone please explain.

Thanks!