Could someone explain to me why objectInfo method on the third button returns undefined for the first value? http://jsfiddle.net/PnSSX/11/
I can’t figure out where this comes from, because there is no property before name…
Can you help? Am I missing something?
Best regards,
shapeshifta
It’s because
loopis initiallyundefinedand you’re calling+=so it gets a converted to a string, to fix it, change this:To this:
You can see the updated/working version here.