background preloader

Javascript

Facebook Twitter

JavaScript Garden. Although JavaScript deals fine with the syntax of two matching curly braces for blocks, it does not support block scope; hence, all that is left in the language is function scope. function test() { // a scope for(var i = 0; i < 10; i++) { // not a scope // count } console.log(i); // 10} There are also no distinct namespaces in JavaScript, which means that everything gets defined in one globally shared namespace.

JavaScript Garden

Each time a variable is referenced, JavaScript will traverse upwards through all the scopes until it finds it. JavaScript Patterns. Useful JavaScript Libraries and jQuery Plugins For Web Developers. Advertisement If you have a problem and need a solution for it, chances are high that a JavaScript library or jQuery plugin exists that was created to solve this very problem.

Useful JavaScript Libraries and jQuery Plugins For Web Developers

Such libraries are always great to have in your bookmarks or in your local folders, especially if you aren’t a big fan of cross-browser debugging. A JavaScript library isn’t always the best solution: it should never be a single point of failure for any website, and neither should a website rely on JavaScript making the content potentially inaccessible. Progressive enhancement is our friend; sometimes JavaScript won’t load properly, or won’t be supported — e.g. users of mobile devices might run into latency issues or performance issues with some JavaScript-libraries.

Often large all-around JavaScript libraries such as jQuery might be an overkill, while tiny JavaScript micro-libraries could serve as good, “light” alternatives for a particular problem. Unheap – A tidy collection of jQuery plugins. A guide to the basics of jQuery - Vimperator. JS: The Right Way - Vimperator.

Javascript Territory - Jster Javascript Catalog.