Live data from Hacker News

The best JavaScript guide ever

developer.mozilla.org

31–40 of 56 posts

Re: The best JavaScript guide ever

#31
post #5

The best way I've found to learn JavaScript is through anything by Douglas Crawford. 'JavaScript the Good Parts' is especially good. http://oreilly.com/catalog/9780596517748 http://www.youtube.com/watch?v=hQVTIJBZook

I wish more books were like that. A programming book for programmers.

Re: The best JavaScript guide ever

#32
post #27
post #25

Earlier quoted context omitted.

Returning an object from a function was not the problem - it was "returning" from a Script (as executed by the NodeJS Script class). So essentially the last value in the script, I suppose. I like the ({x:1}) shortcut, thanks!

I don't quite understand what you mean by 'returning from a script'. That doesn't make too much sense within Javascript itself, if it's a case of the last expression being considered the return value (I haven't used NodeJS), then you would want: doSomething(); ({x:1});

    eval("{x:1}") // returns 1
    eval("({x:1})") // returns {x:1}

Re: The best JavaScript guide ever

#34
post #5

The best way I've found to learn JavaScript is through anything by Douglas Crawford. 'JavaScript the Good Parts' is especially good. http://oreilly.com/catalog/9780596517748 http://www.youtube.com/watch?v=hQVTIJBZook

Agreed, but the name is Crockford. His site, which has a bunch of interesting JavaScript links on it: http://crockford.com

Re: The best JavaScript guide ever

#36
post #34
post #5

The best way I've found to learn JavaScript is through anything by Douglas Crawford. 'JavaScript the Good Parts' is especially good. http://oreilly.com/catalog/9780596517748 http://www.youtube.com/watch?v=hQVTIJBZook

Agreed, but the name is Crockford. His site, which has a bunch of interesting JavaScript links on it: http://crockford.com

Woops my bad, apologies to Mr. Crockford.

Re: The best JavaScript guide ever

#37

I personally prefer programming guides with some humor, lots of examples and exercises. That's why I recommend Eloquent Javascript by Marijn Haverbeke. http://eloquentjavascript.net/

Yeah you are right. Eloquent Javascript is the best introduction I know - free or commercial. Most Javascript books I know aren't very good.

Re: The best JavaScript guide ever

#39
post #5

The best way I've found to learn JavaScript is through anything by Douglas Crawford. 'JavaScript the Good Parts' is especially good. http://oreilly.com/catalog/9780596517748 http://www.youtube.com/watch?v=hQVTIJBZook

His point that JavaScript is quite good with a few key flaws, and the reason so many people think they hate JS is the flaws of the DOM, is an important observation.

Re: The best JavaScript guide ever

#40
This used to be my sole resource for everything javascript, it is actually very good still but there's a slight catch; beware cross browser compatibility issues, especially with IE, especially especially with older versions of IE.
Post reply on HN