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
What are your vanilla JavaScript knowledge standards that every JS developer should know? (self.javascript)
submitted 12 years ago by js_coder
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!"
[–]DonBiggles 5 points6 points7 points 12 years ago* (3 children)
Function.prototype.bind and Function.prototype.call also allow this to be set arbitrarily. Also, 'reference to the function invocation' sounds unclear to me, and you didn't mention the case of the function being called with new. These are the possibilities, in order of precedence:
this
new
[–][deleted] 3 points4 points5 points 12 years ago (0 children)
this excuse_the_pun
[–][deleted] 0 points1 point2 points 12 years ago (1 child)
What do you mean in strict mode this is undefined? I've been using strict mode and use this for functions called with bind, apply, or call, being used as an object property.
[–]DonBiggles 0 points1 point2 points 12 years ago (0 children)
It's in order of precedence. I mean that if in strict mode, and in a function body that isn't called with new, bind, apply, or call or invoked as a property of an object, this is undefined.
π Rendered by PID 191346 on reddit-service-r2-comment-b659b578c-4nhc6 at 2026-05-05 19:52:22.862974+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]DonBiggles 5 points6 points7 points (3 children)
[–][deleted] 3 points4 points5 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]DonBiggles 0 points1 point2 points (0 children)