Live data from Hacker News

The best JavaScript guide ever

developer.mozilla.org

51–56 of 56 posts

Re: The best JavaScript guide ever

#51
post #36
post #34

Earlier quoted context omitted.

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.

You'd better apologize: http://crockfordfacts.com/GN_06PA13xG5uKNcAkuh_Q

Re: The best JavaScript guide ever

#53
post #43

Earlier quoted context omitted.

Yes, as several people have mentioned, I should have said block scope . JS does allow for blocks, but they don't work the way the parent was thinking. You can toss extra curly braces in the code and it is a "block" but unless they are preceded by an "if", "for", or something similar, they don't do much. They do not return values and they do not affect variable scope. Functions do both, hence my last example.

I think my understanding of blocks is fine. "Returning" was the wrong expression, I meant the value of a script (like the result of an eval). I am aware of the lack of block scope in JS :-)

Gotcha, glad you've got it figured out then =]

Re: The best JavaScript guide ever

#54

Earlier quoted context omitted.

I agree. Eloquent Javascript is excellent.

At least in Google Chrome on a Mac, all I get are blank white pages. If I hit view source, then I see text, but otherwise I see no text.

Works for me in Chrome 6.0.472.63 on MacOS 10.6.4.

Re: The best JavaScript guide ever

#55
I do like the content of MDC, but it can be frustrating at times, as it seems to have broken links (links that go to pages which have had their content merged into a different page).

Or apparently, on the Processing XML with E4X page, there are errors in the page: /content/body/div[2]/pre[1]/@function, reference to undefined name 'syntax': line 1, column 1 where every code sample should be.

It's under a CC license, so I am hoping that someone will make a better interface for the content some day.

Post reply on HN