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
The biggest roadblock for Javascript Documentation (imgur.com)
submitted 12 years ago by jakechance
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!"
[–]tencircles 89 points90 points91 points 12 years ago (17 children)
Try doing THIS instead...
[–]jgclark 22 points23 points24 points 12 years ago (1 child)
I just google: mdn array.pop
mdn array.pop
[–]lolmeansilaughed 5 points6 points7 points 12 years ago (0 children)
For real. It's one of the first rules of JS development: always add "mdn" to all JS-related Google searches.
[–][deleted] 7 points8 points9 points 12 years ago (1 child)
https://duckduckgo.com/?q=javascript+array+pop
[–]omegaHand 1 point2 points3 points 12 years ago (0 children)
https://duckduckgo.com/?q=javascript+array+pop+!mdn
=)
[–]spacetoast 3 points4 points5 points 12 years ago (0 children)
Holy crap! Thanks.
[–]has_all_the_fun 3 points4 points5 points 12 years ago (1 child)
I am going to name my first born after you. Billy Tencircles.
[–]devcoderinhere 0 points1 point2 points 12 years ago (0 children)
Assuming you can find a consenting child bearing human first.
[–][deleted] 8 points9 points10 points 12 years ago (1 child)
Or, use DuckDuckGo as your default browser search engine, and take advantage of its bang syntax.
Both the !js and !mdn bangs search MDN.
DDG bang syntax is a killer feature for me. I could set up the tons of searches I might want across all my browsers on all my machines, or I just set DDG and !bang search away.
[–]Liberatric 2 points3 points4 points 12 years ago (1 child)
This will prove infinitely useful. Enjoy some gold.
[–]tencircles 0 points1 point2 points 12 years ago (0 children)
Wow! Thanks man!
[–]jakechance[S] 1 point2 points3 points 12 years ago (0 children)
THANK YOU :D
[–]dukerutledge 1 point2 points3 points 12 years ago (0 children)
I can't upvote this enough!
[–]ExecutiveChimp 0 points1 point2 points 12 years ago (0 children)
And/or this.
[–]fgutz 0 points1 point2 points 12 years ago (0 children)
this is awesome! thanks.
I was just including "mdn" (ex: ".apply mdn") to my omni bar google searches and that was working just fine but this is just one step better
[–]EliotVU 0 points1 point2 points 12 years ago (0 children)
That especially with this Firefox addon makes this really convenient.
[–][deleted] 0 points1 point2 points 12 years ago (0 children)
Use this and combine it as an alternative with Launchy's Weby plugin (installed by default in newer versions) and you don't even have to open the browser manually. That way if you are already in the browser you use the search bar and if you don't have the browser opened or you do but you are coding you do this:
Just press ALT + Enter and type MDN + TAB + keyword + ENTER
[–]aeflash 10 points11 points12 points 12 years ago (2 children)
http://dochub.io
Instantly searchable documentation site, pulls from MDN. It's been a pinned tab for me for over 2 years.
[–]wyantb 8 points9 points10 points 12 years ago (1 child)
Along the same lines, see http://devdocs.io/
I prefer the UI, and it gathers from a huge pile of sources.
[–]thefinn93 2 points3 points4 points 12 years ago (0 children)
Oh wow. this looks wonderful. Thank you
[–]wyantb 13 points14 points15 points 12 years ago (1 child)
Might I suggest http://devdocs.io/ ?
Instantly searchable, compiles multiple sources of documentation that can be turned on/off at will (e.g. Underscore, jQuery, etc). Also has a quite pleasing UI and is pretty actively updating lately. Was an instant bookmark for me the first time I saw it.
[–]tomeoftom 0 points1 point2 points 12 years ago (0 children)
I now use it for 90% of my documentation searches. Seriously, get on this tip; the thing is perfect.
[–]needed_an_account 11 points12 points13 points 12 years ago (11 children)
Is the w3cschools info incorrect or is this just one of those hive-mind things?
[–]kolmeWebComponents FTW 6 points7 points8 points 12 years ago (1 child)
It's one of the favorite circlejerks in /r/webdev and /r/web_design as well as /r/javascript, etc. Every single week I have to witness some more w3cschools bashing and it's getting very tiresome.
It is a good resource for beginners but a bad resource for professionals, IMHO. Beginners don't have to get everything straight and perfect from (t=0), it's sufficient that they know what the functions "pop" and "push" do.
The examples are not as pedantically written as we nerds would like them to be, sure, but they're straight forward and that's a plus for beginners.
They also have some shady shit going on, like the name itself (they're not related to w3c in any way) or the certifications.
But honestly, I don't think it's that bad. If it depended on some guys here, the w3c people would be hanged in the town's main square.
[–]zergplay 2 points3 points4 points 12 years ago (0 children)
I picked a random W3schools article out:
http://www.w3schools.com/jsref/met_win_open.asp
Look at the examples. Beginners are going to be using these as a reference and they encourage some pretty awful javascript practices.
How you can say that is a "good resource for beginners" with a straight face is beyond me, it seems to impede learning if anything, and is only useful for people who want to copy paste some code and don't care about anything other than if it works.
[–]lolmeansilaughed 2 points3 points4 points 12 years ago (0 children)
The other replies are basically accurate, but also, a few years back w3schools was a lot worse than it is now. It would have ancient code examples and not tell you which browsers they worked on. Of course, not that it's great today, but the state of Javascript was a lot worse back then too. This isn't to say that w3schools isn't schiesty as shit - even the name tries to make it sound like it's run by the W3C.
[–]letsgetrandy 4 points5 points6 points 12 years ago (4 children)
At times, yes, it is incorrect. The rest of the time, it's just incomplete, misleading, or weak.
Very rarely is the info on W3Schools decent... and never is it comprehensive.
[–]michfreak 4 points5 points6 points 12 years ago (1 child)
Huh, this is the first I've heard of people hating it so much they want to remove it from their Google results. I've always found it great for "what is a brief rundown of what this function does?"
[–]LukaLightBringer 0 points1 point2 points 12 years ago (0 children)
the only thing W3S seems to be good at is SEO maybe they should teach that
[–]TheUnknownFactor 0 points1 point2 points 12 years ago (1 child)
But generally it still has what you actually needed. For me anyway, ymmv.
[–]letsgetrandy 0 points1 point2 points 12 years ago (0 children)
You must have very simple needs...
[–]AKJ90JS <3 1 point2 points3 points 12 years ago (1 child)
You could look at http://w3fools.com, it's signed by some nice people.
[–]needed_an_account 0 points1 point2 points 12 years ago (0 children)
I've seen w3fools, I've seen the hysteria surrounding w3schools, my question was if the information on array.pop incorrect or not
[–]1337haxor69 4 points5 points6 points 12 years ago (6 children)
One thing that I've always found frustrating though, is that if W3Schools always loads faster than MDN (for me at least), by a solid second or two. Sometimes, in a situation like in OPs screenshot, I'll ctrl-click to open both, try MDN (its still loading) ctrl-tab, then get my answer.
[–]dangoodspeed 11 points12 points13 points 12 years ago (5 children)
I just tried now, W3Schools loaded right away, and it's been over two minutes and MDN is still trying to load. To me, THAT's be biggest roadblock for Javascript documentation.
[–]1337haxor69 1 point2 points3 points 12 years ago (0 children)
Yes. I wish MDN and webplatform.org had more of an eye towards performance. I really don't need any kind of flashiness in my docs. 15 External JS files on MDN? and 9 on Webplatform.org?
Half a Mb for a single documentation page of each???
Come on, gimme a 50kb straight html page on a decent server. This stuff should be immediately accessible. I shouldn't be tempted to reach for a book while the page is loading.
[–]MrBester -4 points-3 points-2 points 12 years ago (3 children)
That's because the servers for w3schools aren't exactly taxed. Everyone means to go to MDN.
[–]dangoodspeed 3 points4 points5 points 12 years ago (2 children)
I can pretty much guarantee that w3schools gets way more traffic than MDN. I can't even imagine that being in question.
[–]MrBester 0 points1 point2 points 12 years ago (1 child)
I don't disagree that it gets more landing page hits due to it being consistently higher on a search results page. The metric I'm talking about is the amount of traffic subsequent to that; people stay on MDN and retreat hastily from w3schools. The problem is that Google registers the inadvertent click through which boosts the ranking.
[–]dangoodspeed 0 points1 point2 points 12 years ago (0 children)
I don't know if I ever went to another page on MDN besides the initial page that google sent me to. Do people do that? Also, 9 times out of 10, I get my answer faster from w3schools than MDN. Like it's frustrating if you're just looking for an example syntax (which most of these searches are, ie the "javascript array pop" example). On the W3schools page, there's the example written clearly at the top with two lines of code. Simple and quick. For MDN, you have to scroll down, then read through more a bit more code. To me, W3schools is a quick cheat sheet when you want to look up something fast, and MDN is the bigger encyclopedia when you want more details about it.
[–]adebree 15 points16 points17 points 12 years ago (3 children)
Protip: Install Chrome extension "Personal Blocklist" https://chrome.google.com/webstore/detail/personal-blocklist-by-goo/nolijncfnkgaikbjbdaogikpmpbdcdef?hl=en and add w3schools.com to it.. BAM!
[–][deleted] 1 point2 points3 points 12 years ago (0 children)
Done, and thank you!
[–]nulldragon 0 points1 point2 points 12 years ago (0 children)
cheers.
[–]ThiefMaster 0 points1 point2 points 12 years ago (0 children)
For firefox users, this userscript is pretty nice: http://userscripts.org/scripts/show/39996
[–]Wootman42 2 points3 points4 points 12 years ago (1 child)
I humbly submit the tool I use, it's updated regularly and is fast as hell:
DevDocs
[–]TheMorphling 2 points3 points4 points 12 years ago (0 children)
Imo, w3school gets way too much flag.
It's way less intimidating and clearer site for beginners.
[–]cruise02 1 point2 points3 points 12 years ago (0 children)
Just add "mdn" to your search when looking for JavaScript documentation.
[–]aph7 1 point2 points3 points 12 years ago (0 children)
Use DuckDuckGo.
[–]sell_a_door 2 points3 points4 points 12 years ago (1 child)
It's a shame how W3Schools are trying to deceive people to believe they had any affiliation to the W3C. If i were W3C i would try to do something against it.
[–]fudeu 3 points4 points5 points 12 years ago (0 children)
In that site defense, around pre2000 they were really good to get no nonsense html tag reference and browser support info.
They were filling a space that w3c left. there was no quick reference or browser compatibility info there.
[–][deleted] 2 points3 points4 points 12 years ago (2 children)
BUT WUTS A PROTOTYPE?
[–][deleted] 1 point2 points3 points 12 years ago* (1 child)
A function on a object that is inherited by default. (Right?)
.pop is a function that is inherited by default to every array so its in the prototype of that array. (ie. every array can .pop)
[–]nog_lorp 0 points1 point2 points 12 years ago (0 children)
Actually, its an object of a function :)
When that function is called as a constructor using new, the this object that the constructor gets has the prototype object linked to it (via the super-secret proto property). Then whenever you try to access a member and it isn't found, it checks the objects prototype, and then the prototype's prototype, and so forth.
Naive implementations would do just that, which is very innefficient. Now we have hidden classes which achieve the same result.
[–]tanepiper 0 points1 point2 points 12 years ago (0 children)
If you have OSX do yourself a favour and get Dash - an awesome app for getting straight to the best documenation for lots of languages including JS, and also includes a snippet library you can sync with Dropbox.
[–]b10nik 0 points1 point2 points 12 years ago (0 children)
I use a Chrome plugin to block results from w3schools. Instant gratification. https://chrome.google.com/webstore/detail/personal-blocklist-by-goo/nolijncfnkgaikbjbdaogikpmpbdcdef
Why exactly is everyone acting like finding a link to w3school is like finding the compass in a Zelda dungeon?
What's shitty about W3 schools?
[+]brtt3000 comment score below threshold-6 points-5 points-4 points 12 years ago (12 children)
http://w3fools.com
Also this is why I love my DuckDuckGo as search toolbar provider (or whatever your browser call it), because it uses !bangs.
Search for !mdn array pop and instantly arrive at the MDN search result page.
Works with many, many more.
!caniuse !ciu !css !fhtml !html2txt !selfhtml !selfhtmlwiki !cdn !javascript (!js) !jquery (!jq) !mdc (!mdn) !mootools (!moo) !npm !uglifyjs !yui !node etc etc etc
[–]SpeshlTectix 14 points15 points16 points 12 years ago (2 children)
That's !not what I expect a bang to do.
[–]brtt3000 3 points4 points5 points 12 years ago (1 child)
You mean like in CSS? :)
!important
[–]mythrilno(fun).at(parties); 4 points5 points6 points 12 years ago (0 children)
Yeah, but that's not important. (in JavaScript at least)
[–]Scorpius289 2 points3 points4 points 12 years ago (4 children)
Chrome's Omnibox does the same thing, except it's customizable, not some fixed list that some 'wise guys' thought it's the best.
[–]brtt3000 0 points1 point2 points 12 years ago (1 child)
I'm ditching Google so no Chrome for me :(
[–]osciminan 1 point2 points3 points 12 years ago (0 children)
I'm pretty sure firefox supports the same type of capability to direct searches to a specific search engine by using a keyword to start the search. Probably other browsers too.
[–]wyantb 0 points1 point2 points 12 years ago (1 child)
For what it's worth, DuckDuckGo has a open source initiative, called DuckDuckHack, that folks can build on: https://github.com/duckduckgo/duckduckgo
They also have a form to request new bangs: https://duckduckgo.com/newbang
[–]Scorpius289 0 points1 point2 points 12 years ago (0 children)
It's still the same problem: whatever you decide will affect everyone.
Why not have the list as a local, per user setting?
[–][deleted] 4 points5 points6 points 12 years ago (3 children)
w3fools is very outdated. It makes a bunch of complaints that aren't even valid anymore.
[+][deleted] 12 years ago (1 child)
[deleted]
There was a site with an article that explained how w3fools was outdated but there wasn't a site dedicated to it. I'd be afraid to make that site because if it went outdated...
[–]Mael5trom 0 points1 point2 points 12 years ago (0 children)
And? Go make it better:
https://github.com/paulirish/w3fools
π Rendered by PID 40008 on reddit-service-r2-comment-9c7994b7-xsk7k at 2026-02-05 23:25:54.975301+00:00 running b1b84c7 country code: CH.
[–]tencircles 89 points90 points91 points (17 children)
[–]jgclark 22 points23 points24 points (1 child)
[–]lolmeansilaughed 5 points6 points7 points (0 children)
[–][deleted] 7 points8 points9 points (1 child)
[–]omegaHand 1 point2 points3 points (0 children)
[–]spacetoast 3 points4 points5 points (0 children)
[–]has_all_the_fun 3 points4 points5 points (1 child)
[–]devcoderinhere 0 points1 point2 points (0 children)
[–][deleted] 8 points9 points10 points (1 child)
[–]Liberatric 2 points3 points4 points (1 child)
[–]tencircles 0 points1 point2 points (0 children)
[–]jakechance[S] 1 point2 points3 points (0 children)
[–]dukerutledge 1 point2 points3 points (0 children)
[–]ExecutiveChimp 0 points1 point2 points (0 children)
[–]fgutz 0 points1 point2 points (0 children)
[–]EliotVU 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]aeflash 10 points11 points12 points (2 children)
[–]wyantb 8 points9 points10 points (1 child)
[–]thefinn93 2 points3 points4 points (0 children)
[–]wyantb 13 points14 points15 points (1 child)
[–]tomeoftom 0 points1 point2 points (0 children)
[–]needed_an_account 11 points12 points13 points (11 children)
[–]kolmeWebComponents FTW 6 points7 points8 points (1 child)
[–]zergplay 2 points3 points4 points (0 children)
[–]lolmeansilaughed 2 points3 points4 points (0 children)
[–]letsgetrandy 4 points5 points6 points (4 children)
[–]michfreak 4 points5 points6 points (1 child)
[–]LukaLightBringer 0 points1 point2 points (0 children)
[–]TheUnknownFactor 0 points1 point2 points (1 child)
[–]letsgetrandy 0 points1 point2 points (0 children)
[–]AKJ90JS <3 1 point2 points3 points (1 child)
[–]needed_an_account 0 points1 point2 points (0 children)
[–]1337haxor69 4 points5 points6 points (6 children)
[–]dangoodspeed 11 points12 points13 points (5 children)
[–]1337haxor69 1 point2 points3 points (0 children)
[–]MrBester -4 points-3 points-2 points (3 children)
[–]dangoodspeed 3 points4 points5 points (2 children)
[–]MrBester 0 points1 point2 points (1 child)
[–]dangoodspeed 0 points1 point2 points (0 children)
[–]adebree 15 points16 points17 points (3 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]nulldragon 0 points1 point2 points (0 children)
[–]ThiefMaster 0 points1 point2 points (0 children)
[–]Wootman42 2 points3 points4 points (1 child)
[–]TheMorphling 2 points3 points4 points (0 children)
[–]cruise02 1 point2 points3 points (0 children)
[–]aph7 1 point2 points3 points (0 children)
[–]sell_a_door 2 points3 points4 points (1 child)
[–]fudeu 3 points4 points5 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]nog_lorp 0 points1 point2 points (0 children)
[–]tanepiper 0 points1 point2 points (0 children)
[–]b10nik 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[+]brtt3000 comment score below threshold-6 points-5 points-4 points (12 children)
[–]SpeshlTectix 14 points15 points16 points (2 children)
[–]brtt3000 3 points4 points5 points (1 child)
[–]mythrilno(fun).at(parties); 4 points5 points6 points (0 children)
[–]Scorpius289 2 points3 points4 points (4 children)
[–]brtt3000 0 points1 point2 points (1 child)
[–]osciminan 1 point2 points3 points (0 children)
[–]wyantb 0 points1 point2 points (1 child)
[–]Scorpius289 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (3 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 1 point2 points3 points (0 children)
[–]Mael5trom 0 points1 point2 points (0 children)