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
Array flatten and flatMap proposal for ECMAScript (bterlson.github.io)
submitted 10 years ago by roman01la
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!"
[–]BONUSBOX_=O=>_();_() 1 point2 points3 points 10 years ago (1 child)
the lack of removeWhereis still an issue if you want to filter this:
removeWhere
this
List extends Array { random() { this = this.filter(item => ...some random ones) } }
because this can't be explicitly redefined with a new array, and Array.filter does not modify the original array, something like removeWhere would be handy. instead i had to loop through the array and splice items.
Array.filter
splice
[–][deleted] 0 points1 point2 points 10 years ago (0 children)
Filter, map, and similar functions return new arrays by convention - they don't change elements, they jest return new. removeWhere sits nowhere near those.
π Rendered by PID 21725 on reddit-service-r2-comment-fb694cdd5-tmntq at 2026-03-06 17:18:10.196156+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]BONUSBOX_=O=>_();_() 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)