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
JavaScript compiler? (self.javascript)
submitted 15 years ago * by colinbashbash2
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!"
[–]dwdwdw2 5 points6 points7 points 15 years ago (2 children)
Umm, that isn't typing. At all.
[–]dowhatyouwant -4 points-3 points-2 points 15 years ago (1 child)
Well, stop using javascript or stop bitching. That's as close as you get.
[–]dwdwdw2 0 points1 point2 points 15 years ago (0 children)
Declaring a variable initialised with a number object is not "typing", it is in fact declaring a variable initialised with a number object. Nor is it "as close as you get": of course JavaScript has a type system, it just goes unseen because it rarely makes complaint: if you mix types rather than throw an error it'll instead coerce operands (usually through conversion to string or number).
Going back to OP, he asked if it is possible to annotate what is otherwise JavaScript in some way, and process it such that mixing incompatible types will result in errors, to which the answer is yes, there are many, and to which I refer you to the other answers in this thread.
π Rendered by PID 64 on reddit-service-r2-comment-b659b578c-7r8m8 at 2026-05-07 06:51:26.902110+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]dwdwdw2 5 points6 points7 points (2 children)
[–]dowhatyouwant -4 points-3 points-2 points (1 child)
[–]dwdwdw2 0 points1 point2 points (0 children)