Is it bad javascript practice to not assign a newly created object to a variable if you\'re never going to access it?
For example:
for(var i=0;i
"Is it bad javascript practice to not assign a newly created object to a variable if you're never going to access it?"
I feel it is bad practice to make an assignment that is not needed, and, I would argue, not just for javascript but in general. If there are side-effects you want, getting them from the action of an assignment is bad practice for the simple reason that it would be fairly opaque from a maintenance point of view.
.