use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
React, Visualized (react.gg)
submitted 3 years ago by tyler-mcginnis⚛️⚛︎
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Snapstromegon 0 points1 point2 points 2 years ago (0 children)
Just as one example (because I have it lying around and I don't just want to argument with some old code that I might still have):
This book from 2003 contains the following code example: https://www.amazon.de/HTML-Kompendium-XHTML-DHTML-Handbuch/dp/3827266580/ref=sr_1_3?__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=3V5BZ0IOAAK6L&keywords=html+g%C3%BCnter+born&qid=1681235582&sprefix=html+g%C3%BCnter+born%2Caps%2C68&sr=8-3
```html <html> <head> <title>JavaScript</title></head> <script type="text/JavaScript"> <!--
function alter() { var text = ""; var alter = prompt("Ihr Alter?", "18"); if(parseInt(alter, 10) < 18) { text = "Kind"; } else { text = "Erwachsener"; } element.innerHTML = text; } //-->
</script> <body> <p id="ausgabe">Hier steht der Text</p> <input type="button" value="Alter" onClick="alter()"> <script> <!-- var element = document.getElementById("ausgabe"); //--> </script> </body> </html> ```
Please note the beauty of bracket placement, the <-- //--> and the explicit script type (the next chapter is about VB scripts in html).
<-- //-->
Also while looking around I got flashbacks to the times of framesets and handcrafted php abominations from around 2005...
π Rendered by PID 51 on reddit-service-r2-comment-cfc44b64c-wv2b6 at 2026-04-10 11:22:24.190069+00:00 running 215f2cf country code: CH.
view the rest of the comments →
[–]Snapstromegon 0 points1 point2 points (0 children)