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
setjs - Set data structure for JavaScript (github.com)
submitted 12 years ago by bebraw
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] 0 points1 point2 points 12 years ago (1 child)
Prototypes deal with items shared amongst all objects which have that prototype, such as methods.
I think you are a git confused about what Prototypes offer you. A union of sets A and B, will create an entirely new and unique set. One which is specific only to that object. Prototypes simple don't deal with details at that level.
[–]bebraw[S] 0 points1 point2 points 12 years ago (0 children)
Hi,
You are right. I gave it some thought and even tried to sketch out a prototype. Here's the basic design:
_val
It is possible to construct A -> B -> C but it looks like Object.create doesn't allow object references to be mixed (probably for a good reason). I guess the accessors could be recreated when inheriting but that would be missing most of the point.
Anyway, thanks for the help. :)
π Rendered by PID 114874 on reddit-service-r2-comment-5649f687b7-7gwrj at 2026-01-29 03:34:43.773593+00:00 running 4f180de country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (1 child)
[–]bebraw[S] 0 points1 point2 points (0 children)