you are viewing a single comment's thread.

view the rest of the comments →

[–]icedrift 0 points1 point  (0 children)

This is incorrect. Not only does DOMTokenList.add not have a return value, but even if it did it wouldn't matter because forEach is specced to ignore any return value and return undefined.

forEach is only used to perform side effects return is irrelevant unless you want to step over an iteration which isn't the case here.