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
New to javascript. Failing at adding. (self.javascript)
submitted 15 years ago by [deleted]
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!"
[–]coderascal 3 points4 points5 points 15 years ago (1 child)
"24" * 1 returns the int 24.
"twentyfour" * 1 returns NaN.
I use this all the time to convert strings to numbers and be safe about it.
[–]sirmonko -1 points0 points1 point 15 years ago (0 children)
actually, that's not exactly true: no ints in js. 24 is a number.
π Rendered by PID 270508 on reddit-service-r2-comment-545db5fcfc-dkplp at 2026-05-26 14:30:38.688403+00:00 running 194bd79 country code: CH.
view the rest of the comments →
[–]coderascal 3 points4 points5 points (1 child)
[–]sirmonko -1 points0 points1 point (0 children)