.innerHTML is great for wiping parts (or the entire) DOM. But yah, should definitely not be used with anything other than an empty string.
Example:
document.innerHTML = '';Example:
document.innerHTML = ''; .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).