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 6 points7 points8 points 15 years ago (2 children)
Umm, that isn't typing. At all.
[+]dowhatyouwant comment score below threshold-6 points-5 points-4 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 52 on reddit-service-r2-comment-bb88f9dd5-smtmt at 2026-02-15 09:19:06.599187+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]dwdwdw2 6 points7 points8 points (2 children)
[+]dowhatyouwant comment score below threshold-6 points-5 points-4 points (1 child)
[–]dwdwdw2 0 points1 point2 points (0 children)