Don't. Use
.textContent = ""; .textContent = "";And it has the same end result.
Also, technically, this should be faster since that empty string is not put through the html parser (tho browsers might optimize for this special case already).