3 ms·
Sounds like premature optimization to me. An empty string will take constant time. Much more concerned with communicating intent, and .textContent is just confu
by michaelmcmillan 7y ago
Sounds like premature optimization to me. An empty string will take constant time. Much more concerned with communicating intent, and .textContent is just confusing.
- rndgermandude 7y agoNot an optimization, like I said, but to avoid having innerHTML in your code. innerHTML isn't that much better communicating intent, either. That's what comments are for.