0
Why does the "for in " loop say undefined when I use the dot syntax to get attributes of an object?
And yet it works when I use object[attribute] https://code.sololearn.com/WrKa6A35X5qz/?ref=app
2 odpowiedzi
+ 1
Ipang aah I see, thank you
0
Line 10
for ( let val in dude1 )
{
console.log( val );
}
Here <val> represents each attribute name (not value) in <dude1>.