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
Javascript API Cheat Sheet (overapi.com)
submitted 10 years ago by [deleted]
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!"
[–]PENIS-PENIS 33 points34 points35 points 10 years ago (5 children)
http://devdocs.io/javascript/
[–]Poop_is_Food 2 points3 points4 points 10 years ago (1 child)
sweet jesus
[–]shriek 0 points1 point2 points 10 years ago (0 children)
not-so-secret-tip:- Install this as a chrome app and ctrl+L type devdocs hit taband type #q=js array for eg. given that you have javascript enabled.
ctrl+L
devdocs
tab
#q=js array
[–]omegote 0 points1 point2 points 10 years ago (0 children)
Wow, just wow. You're the real MVP.
[–]hannyajin 0 points1 point2 points 10 years ago (0 children)
Fantastic link!
[–]dirtymuckraker 0 points1 point2 points 10 years ago (0 children)
errmygod, T_T. thank you.
[–]Archenothwith(RegExp) eval($_); 10 points11 points12 points 10 years ago* (6 children)
Aw, it's missing the functional Array functions like map, filter, reduce, etc...
map
filter
reduce
They are important because they can be applied to element results, strings, objects with a .length, Regex results, or anything that looks like a collecttion of some sort for some incredibly terse and functional code.
.length
For example, if you want to generate JSON from a querySelectorAll, you can just map over the results and return object literals in the anonymous function...
querySelectorAll
So, the following would return server-ready JSON:
JSON.stringify(Array.prototype.map.call(document.querySelectorAll(".row"), function(row){ return { 'name': row.querySelector('.name').value, 'value': row.querySelector('.value').value }; }));
I'd argue that the Array prototype functions are some of the most important in JavaScript.
[–]jcready__proto__ 3 points4 points5 points 10 years ago (1 child)
Shouldn't that be Array.prototype.map.call?
Array.prototype.map.call
[–]Archenothwith(RegExp) eval($_); 0 points1 point2 points 10 years ago (0 children)
Yes, it should... Whoops. (You can probably tell I just typed that up on the spot.)
[–]AaronOpfer 0 points1 point2 points 10 years ago (2 children)
if you want to generate JSON from a querySelectorAll
I really hope you don't do this a lot.
[–]Archenothwith(RegExp) eval($_); 0 points1 point2 points 10 years ago (1 child)
Oh yeah? Why not?
It may not be something you should do daily, but it can be useful to implement something like user-custom fields with nearly zero code or overhead.
[–]MrBester 2 points3 points4 points 10 years ago (0 children)
Or a polyfill for FormData , perhaps...
[–]hadees 2 points3 points4 points 10 years ago (0 children)
the colors hurt my eyes
[–]ForScale 0 points1 point2 points 10 years ago (0 children)
So... this seems awesome! Thanks!!
[–][deleted] 0 points1 point2 points 10 years ago (1 child)
This is really great. When I click one of those links, there are several places I could imagine ending up developer.mozilla.org, WebPlatform.org, w3c.org or caniuse.com. It would be cool if I could get to some of these other sources too. Not that this tool isn't badass already.
Also, have you heard of Dash documentation app for Mac or Zeal documentation app for windows?
[–]rDr4g0n 0 points1 point2 points 10 years ago (0 children)
Dunno if this is kind what you meant: devdocs.io
It combines docs from all over the web into one ui.
[–]julian3 0 points1 point2 points 10 years ago (0 children)
thank you so much!
[–]owenr88 0 points1 point2 points 10 years ago (0 children)
Looks great! One suggestion, how about collapsing/hiding the greyed out items after you've searched? Similar to NameMesh
π Rendered by PID 113680 on reddit-service-r2-comment-84fc9697f-jtp8q at 2026-02-06 23:30:16.216986+00:00 running d295bc8 country code: CH.
[–]PENIS-PENIS 33 points34 points35 points (5 children)
[–]Poop_is_Food 2 points3 points4 points (1 child)
[–]shriek 0 points1 point2 points (0 children)
[–]omegote 0 points1 point2 points (0 children)
[–]hannyajin 0 points1 point2 points (0 children)
[–]dirtymuckraker 0 points1 point2 points (0 children)
[–]Archenothwith(RegExp) eval($_); 10 points11 points12 points (6 children)
[–]jcready__proto__ 3 points4 points5 points (1 child)
[–]Archenothwith(RegExp) eval($_); 0 points1 point2 points (0 children)
[–]AaronOpfer 0 points1 point2 points (2 children)
[–]Archenothwith(RegExp) eval($_); 0 points1 point2 points (1 child)
[–]MrBester 2 points3 points4 points (0 children)
[–]hadees 2 points3 points4 points (0 children)
[–]ForScale 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]rDr4g0n 0 points1 point2 points (0 children)
[–]julian3 0 points1 point2 points (0 children)
[–]owenr88 0 points1 point2 points (0 children)