Created
November 26, 2021 06:06
-
-
Save DavidWells/33bfd3e120347d5ec93d124ab365253d to your computer and use it in GitHub Desktop.
Shortcut for manipulating DOM for code golfing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* https://news.ycombinator.com/item?id=29346918 */ | |
<div id=result></div> | |
<script> | |
document.getElementById("result").textContent = "Why do it this way—"; | |
document.querySelector("result").textContent = "—or even this way—"; | |
result.textContent = "—when you can do it this way?"; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment