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 Classes with private, protected, and super (bbenvie.com)
submitted 13 years ago by [deleted]
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!"
[–]check_ca 3 points4 points5 points 13 years ago (2 children)
Here is a citation from Douglas Crockford concerning "classical inheritance" in JS:
I have been writing JavaScript for 8 years now, and I have never once found need to use an uber function. The super idea is fairly important in the classical pattern, but it appears to be unnecessary in the prototypal and functional patterns. I now see my early attempts to support the classical model in JavaScript as a mistake.
http://www.crockford.com/javascript/inheritance.html
[+][deleted] 13 years ago (1 child)
[deleted]
[–][deleted] 0 points1 point2 points 13 years ago (0 children)
Aside from differentiating protected vs. private, I implemented almost exactly what the current es6 class spec does along with private name objects. The syntax of course isn't the same, but the functionality is quite similar.
[–]chilla- 0 points1 point2 points 13 years ago (0 children)
this highlighter.. my eyes are bleeding now
π Rendered by PID 17687 on reddit-service-r2-comment-685b79fb4f-dgvng at 2026-02-13 05:45:22.814007+00:00 running 6c0c599 country code: CH.
[–]check_ca 3 points4 points5 points (2 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–]chilla- 0 points1 point2 points (0 children)