Comments on: News: Collection of JavaScript Tools And More http://mattsnider.com/languages/javascript/news-collection-of-javascript-tools-and-more/ Understanding JavaScript and Frameworks Thu, 20 Nov 2008 21:34:48 +0000 http://wordpress.org/?v=2.1.2 By: Adam http://mattsnider.com/languages/javascript/news-collection-of-javascript-tools-and-more/#comment-12140 Adam Fri, 18 Apr 2008 07:29:02 +0000 http://mattsnider.com/languages/javascript/news-collection-of-javascript-tools-and-more/#comment-12140 Would you mind summarising Crockford's decision to remove the var keyword, if you can? Would you mind summarising Crockford’s decision to remove the var keyword, if you can?

]]>
By: Matt Snider http://mattsnider.com/languages/javascript/news-collection-of-javascript-tools-and-more/#comment-12181 Matt Snider Fri, 18 Apr 2008 16:16:38 +0000 http://mattsnider.com/languages/javascript/news-collection-of-javascript-tools-and-more/#comment-12181 If you use "var foo = {}" and then try a statement such as: "var pity = this.pity || {};". It will fail in certain browsers (:cough: IE :cough:)... If , in the global space, you drop the "var" part, as in my example, then the statement works in all browsers. The comment in my example is for Crockford's jslint program, so that it doesn't throw an error when encountering a variable in this format. If you use “var foo = {}” and then try a statement such as: “var pity = this.pity || {};”. It will fail in certain browsers (:cough: IE :cough:)… If , in the global space, you drop the “var” part, as in my example, then the statement works in all browsers.

The comment in my example is for Crockford’s jslint program, so that it doesn’t throw an error when encountering a variable in this format.

]]>