JavaScript Enlightenment | by Cody Lindley | 1st Edition | ECMA-262, Edition 3
AlexNogard : Tutos IT Linux : Supervision : Centreon, Nagios, Owncloud; Windows Server 2012 : Hyper-V 3
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. Each time a variable is referenced, JavaScript will traverse upwards through all the scopes until it finds it. In the case that it reaches the global scope and still has not found the requested name, it will raise a ReferenceError. The Bane of Global Variables // script Afoo = '42'; // script Bvar foo = '42' The above two scripts do not have the same effect. Again, that is not at all the same effect: not using var can have major implications. // global scopevar foo = 42;function test() { // local scope foo = 21;}test();foo; // 21 Local Variables var foo = 3; bar = 4;}test(10); Hoisting
Voyage au coeur de JavaScript (ECMAScript 3)
Cet article est une traduction de JavaScript. The Core écrit par Dmitry Soshnikov. Javascript The Core est un sommaire détaillé de la série d’article “ECMA-262-3 in detail”. Commençons par étudier le concept d'objet, un fondamental d'ECMAScript. L'objet ECMAScript étant un langage orienté objet de haut niveau, il fonctionne avec des objets. Un objet est une collection de propriétés qui possède un unique objet prototype. Prenons pour exemple un objet simple. Cet objet possède deux propriétés explicitement déclarées et une propriété __proto__ implicite qui est une référence au prototype de foo: Mais pourquoi ces prototypes sont-ils requis ? Le chaînage des prototypes Les prototypes sont des objets comme les autres et peuvent posséder leurs propres prototypes. Une chaîne de prototype est une chaîne finie d'objet utilisé pour implémenter l'héritage et le partage de propriétés. Examinons le cas où nous avons deux objets qui diffèrent sensiblement. ECMAScript ne possède pas de concept de classe.
JavaScript Succinctly
JavaScript Succinctly was written to give readers an accurate, concise examination of JavaScript objects and their supporting nuances, such as complex values, primitive values, scope, inheritance, the head object, and more. If you’re an intermediate JavaScript developer and want to solidify your understanding of the language, or if you’ve only used JavaScript beneath the mantle of libraries such as jQuery or Prototype, this is the book for you. Author Cody Lindley talks about his latest book in Syncfusion's Succinctly series, JavaScript Succinctly. Given his many years of expertise and the overwhelming success of this last publication—jQuery Succinctly—what Cody says about JavaScript is something all experienced frontend developers should take to heart.
Javascript quiz
I was recently reminded about Dmitry Baranovsky's Javascript test, when N. Zakas answered and explained it in a blog post. First time I saw those questions explained was by Richard Cornford in comp.lang.javascript, although not as thoroughly as by Nicholas. I decided to come up with my own little quiz. Host objects Contrary to Dmitry's test, quiz does not involve host objects (e.g. window), as their behavior is unspecified and can vary sporadically across implementations. So what are we testing? Not a lot really. Note, however, that not all questions are very practical, so don't worry if you can't answer some of them. Few notes about code Quiz Please make sure you select answer in each question, as lack of answer is not checked and counts as failure. I hope you liked it.
Book of Modern Front-end Tooling
You Might Not Need jQuery
JS The Right Way
Read Understanding ECMAScript 6 | Leanpub
Introduction The JavaScript core language features are defined in a standard called ECMA-262. The language defined in this standard is called ECMAScript. What you know as JavaScript in browsers and Node.js is actually a superset of ECMAScript. Browsers and Node.js add more functionality through additional objects and methods, but the core of the language remains as defined in ECMAScript. The Road to ECMAScript 6 In 2007, JavaScript was at a crossroads. The scope of the ECMAScript 4 changes caused a rift to form in TC-39, with some members feeling that the fourth edition was trying to accomplish too much. ECMAScript 3.1 introduced very few syntax changes, instead focusing on property attributes, native JSON support, and adding methods to already-existing objects. In 2008, Brendan Eich, the creator of JavaScript, announced that TC-39 would focus its efforts on standardizing ECMAScript 3.1. ECMAScript 6 reached feature complete status in 2015 and was formally dubbed “ECMAScript 2015.”
Learn how to code by playing a game