3 ms·
It wasn't actually working for me; it was returning 0 actually. But yeah, this is a good point as well. :D
by bigpeopleareold 5y ago
It wasn't actually working for me; it was returning 0 actually. But yeah, this is a good point as well. :D
- chrismorgan 5y agoHuh, turns out my understanding of how it worked was wrong: in things like for loops, it takes the last value encountered. I should have anticipated that, really, given that “last expression” isn’t generally a thing in JavaScript anyway (it’s statement-oriented, not expression-oriented), so javascript: URIs (and I guess on* event handler attributes too, I know they’re a bit weird too) were clearly doing something clever and not-usual-JavaScript. I should delve into specs until I can find it; it seems like it’s at least mildly expression-oriented in character. I retract the first paragraph of my earlier comment with an apology.