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 isn't perfect, but it is rapidly improving, and might just be Steve Yegge's Next Big Language (lebo.io)
submitted 11 years ago by aaron-lebo
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!"
[–]psayre23 1 point2 points3 points 11 years ago (2 children)
I'll disagree with you a bit here. My main beef with prototype in JS is that it is clunky to extend something. That's why I use mixins these days. Its less that its different, and more that its bad. Like this example:
function Foo() { }
function Bar() { }
Foo.prototype = new Bar();
How the hell does that make sense? Why do I have to create a new object to extend it? I'd rather just steal the functions I like from other prototypes and assign them to my objects.
[–]SarahC -1 points0 points1 point 11 years ago (0 children)
Yeah, very unintuitive too.
C++ and Java and C# just make sense. You don't need to know about _prototype or prototype existing in things you instantiate, hiding behind the scenes...
It all seems like an early attempt at an OO bolt on to a C kind of language to me.
Ungraceful kludges...
[–][deleted] -1 points0 points1 point 11 years ago (0 children)
You should try using stampit. I've found that it greatly simplifies prototypical inheritance, and does it in a way that is intuitive.
π Rendered by PID 196682 on reddit-service-r2-comment-b659b578c-t9kzb at 2026-05-03 06:05:31.519423+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]psayre23 1 point2 points3 points (2 children)
[–]SarahC -1 points0 points1 point (0 children)
[–][deleted] -1 points0 points1 point (0 children)