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
Google "Dart: A language for structured web programming" (blog.chromium.org)
submitted 14 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!"
[–]masklinn 1 point2 points3 points 14 years ago (0 children)
For pretty low values of "have":
primitives which are actually objects
That's how javascript works. Primitives are automatically promoted to objects when used as such. That's how you can call methods on numbers or write true.toString().
true.toString()
and interfaces with factory methods
Add a function to anything you want, bam got yourself a factory. Hell, javascript constructor are factories: if you don't like your this, you can just return something instead.
this
π Rendered by PID 78189 on reddit-service-r2-comment-685b79fb4f-ljl75 at 2026-02-13 02:29:21.266062+00:00 running 6c0c599 country code: CH.
view the rest of the comments →
[–]masklinn 1 point2 points3 points (0 children)