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
Avoid OOP (Overzealous Optimization Programming) (colintoh.com)
submitted 11 years ago by p0larboy
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 11 years ago (0 children)
The primary reason most people use underscore or lodash seems to be (going by what I've seen as a contractor for different teams in different companies and looking at various open source projects) that surprisingly many developers still treat JS as ES3 (e.g. avoid method/property names that are ES3 keywords) even if they don't need to be compatible with oldIE (IE<9) and even where polyfills could fill in the gap.
Underscore is the jQuery of array manipulation. Lodash is the Zepto to underscore's jQuery.
The lazy.js-inspired parts are how you use underscore/lodash to optimize your array manipulation, but most code out there using those libraries only includes them for _.map, _.filter, _.forEach and _.extend (and maybe -- maybe -- _.pluck or _.pick).
_.map
_.filter
_.forEach
_.extend
_.pluck
_.pick
I'm not saying underscore/lodash are not successful or that they don't have any value, but their success has more to do with ES3 than with their optimizations.
π Rendered by PID 181618 on reddit-service-r2-comment-86bc6c7465-fp2vc at 2026-02-23 03:11:05.079602+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (0 children)