4 ms·
Personally, I find both examples from your post rather unreadable. I always chain method calls like this: document .getElementsByClassName("externa
by nimbix 17y ago
Personally, I find both examples from your post rather unreadable. I always chain method calls like this:
document
.getElementsByClassName("externalLinkBig")[0]
.setAttribute("class", "externalLinkSmall");
- axod 17y agoThat's ugly (IMHO) and not a good idea in js where semicolons are optional... For all we know it may execute 'document' as a statement, and then the next lines. Not nice IMHO If you can fit 160 chars on the display, use 160.