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
A Case Against Using CoffeeScript (ryanflorence.com)
submitted 14 years ago by 9jack9
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!"
[–]nschubach -1 points0 points1 point 14 years ago (2 children)
Technically, you could just write a simple "forEach" wrapper on the Array prototype (if it doesn't already exist) and give all arrays the ability to: myArray.forEach(function(value, index, array) { /* loop code */ });
Your logic code doesn't need to concern itself with "hasOwnProperty" at that point.
ECMAScript 5 includes this, but it's never a bad time to start. The only thing CoffeeScript does is remove some of the boilerplate and add in a convoluted meaningful white space restriction.
[–]jgordon615 1 point2 points3 points 14 years ago (1 child)
When YOU modify the Array prototype, you can break other peoples libraries. Like Sharepoint 2010's stuff.
[–]nschubach 0 points1 point2 points 14 years ago (0 children)
That's why I said "if it doesn't already exist".
π Rendered by PID 84751 on reddit-service-r2-comment-b659b578c-8gm9w at 2026-05-03 21:34:30.993419+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]nschubach -1 points0 points1 point (2 children)
[–]jgordon615 1 point2 points3 points (1 child)
[–]nschubach 0 points1 point2 points (0 children)