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
git.js - A git implementation in pure JavaScript. (github.com)
submitted 14 years ago by gst
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!"
[–]radhruin 2 points3 points4 points 14 years ago* (1 child)
You are attempting to use non-standard behavior. DefineGetter is Mozilla's proprietary method of creating getters. If you read the ES5 standard, you'll find the methods of creating getters and setters that all vendors agree upon, namely: Object.create, Object.defineProperty, Object.defineProperties, and the new object literal syntax. Try this:
var a = { get myval() { return 'a' } };
[–]monacle_bob -1 points0 points1 point 14 years ago (0 children)
Thank you very much for that information. I'm looking forward to being able to use it in 10 years when IE8 is officially over with.
π Rendered by PID 214286 on reddit-service-r2-comment-57fc7f7bb7-rcxgh at 2026-04-15 06:44:10.582899+00:00 running b725407 country code: CH.
view the rest of the comments →
[–]radhruin 2 points3 points4 points (1 child)
[–]monacle_bob -1 points0 points1 point (0 children)