Re:Vanilla JS, fast, lightweight, cross-platform framework
by ams6110 on Sunday August 26, 2012 @04:13PM
(#4436077)
there's no block scope. Only function scope.
There is global scope as well, and it's (unfortunately in most cases) the default.
Re:Vanilla JS, fast, lightweight, cross-platform framework
by MatthewPhillips on Sunday August 26, 2012 @06:14PM
(#4436434)
Also there is block scope. let { ... }
Re:Vanilla JS, fast, lightweight, cross-platform framework
by evilduck on Sunday August 26, 2012 @09:26PM
(#4436974)
AFAIK, let is a Mozilla only feature.
Re:Vanilla JS, fast, lightweight, cross-platform framework
by freepipi on Monday August 27, 2012 @07:42AM
(#4438326)
I want to learn something about jQuery,because recently I need to develop an application which use webkit. It has a feature that need to highlight some special words. After search in the internet, I found the jQuery can 'easily' do that. But the syntax of jQuery make me headache, then I happened to see this article.
Thank you very much , I am very appreciate for your advice:)
Some JS people (the ones usually with a long beard) hate how kids use frameworks like jQuery and this site is an attempt at telling them "The vanilla JS, i.e. the standard language that all browsers use and your cool jQuery leverage under the hood, is quite capable these days. Use it". They are not quite right, but aren't quite wrong either (IMO). You'll be a dreadful JS programmer if you only know jQuery. JS is sooo different from C (and Java) that if you don't know the core language everything you'll do will be wrong. For starter: there's no block scope. Only function scope.
Every JS programmer should read "JavaScript: The Good Parts" by Douglas Crockford cover to cover - before learning jQuery.