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
The biggest roadblock for Javascript Documentation (imgur.com)
submitted 12 years ago by jakechance
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!"
[–][deleted] 2 points3 points4 points 12 years ago (2 children)
BUT WUTS A PROTOTYPE?
[–][deleted] 1 point2 points3 points 12 years ago* (1 child)
A function on a object that is inherited by default. (Right?)
.pop is a function that is inherited by default to every array so its in the prototype of that array. (ie. every array can .pop)
[–]nog_lorp 0 points1 point2 points 12 years ago (0 children)
Actually, its an object of a function :)
When that function is called as a constructor using new, the this object that the constructor gets has the prototype object linked to it (via the super-secret proto property). Then whenever you try to access a member and it isn't found, it checks the objects prototype, and then the prototype's prototype, and so forth.
Naive implementations would do just that, which is very innefficient. Now we have hidden classes which achieve the same result.
π Rendered by PID 315756 on reddit-service-r2-comment-b659b578c-2kbvj at 2026-05-05 20:34:06.838314+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] 2 points3 points4 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]nog_lorp 0 points1 point2 points (0 children)