background preloader

JavaScript Essentials

JavaScript Essentials

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. 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 Leaving out the var statement inside the function test will override the value of foo. // global scopevar items = [/* some list */];for(var i = 0; i < 10; i++) { subLoop();}

Book of Modern Front-end Tooling Essential JavaScript Design Patterns For Beginners I would like to thank Rebecca Murphey for inspiring me to open-source this mini-book and release it for free download and distribution - making knowledge both open and easily available is something we should all strive for where possible. I would also like to extend my thanks to the very talented Alex Sexton who was kind enough to be the technical reviewer for this publication. I hope that it helps you learn more about design patterns and the usefulness of their application to JavaScript. Volume 2 of Essential JavaScript Design Patterns is currently being written and will be more detailed than this first edition. At the beginning of this book I will be focusing on a discussion about the importance and history of design patterns in any programming language. One of the most important aspects of writing maintainable code is being able to notice the recurring themes in that code and optimize them. You may ask why it’s important to understand patterns and be familiar with them.

JS: The Right Way JavaScript Allongé A Pull of the Lever: Prefaces “Café Allongé, also called Espresso Lungo, is a drink midway between an Espresso and Americano in strength. There are two different ways to make it. The first, and the one I prefer, is to add a small amount of hot water to a double or quadruple Espresso Ristretto. Like adding a splash of water to whiskey, the small dilution releases more of the complex flavours in the mouth. “The second way is to pull an extra long double shot of Espresso. Foreword by Michael Fogus As a life-long bibliophile and long-time follower of Reg’s online work, I was excited when he started writing books. The act of writing is an iterative process with (very often) tight revision loops. In the case of JavaScript Allongé, you’ll find the Leanpub model a shining example of effectiveness. As a staunch advocate of functional programming, much of what Reg has written rings true to me. Enjoy. – Fogus, fogus.me Foreword by Matthew Knox –Matthew Knox, mattknox.com Why JavaScript Allongé? Legend

Dive Into HTML5 ive Into HTML5 seeks to elaborate on a hand-picked Selection of features from the HTML5 specification and other fine Standards. The final manuscript has been published on paper by O’Reilly, under the Google Press imprint. Buy the printed Work — artfully titled “HTML5: Up & Running” — and be the first in your Community to receive it. Table of Contents “If you’re good at something, never do it for free.” Copyright MMIX–MMXI Mark Pilgrim Learn how to code by playing a game JavaScript Enlightenment | by Cody Lindley | 1st Edition | ECMA-262, Edition 3 Practical PHP Programming Oh My JS by Azat Mardan JavaScript is great! It's in the browser and on the server. We love it! But sometime we, JavaScript developers, find topics such as scoping, object instantiating, "this" context, etc. confusing and poorly documents. Oh My JavaScript is a collection of best articles on JavaScript/Node.js which will save your many hours of frustrations and internet searches! Oh My JavaScript: The Best Article is a compilation of publicly available resources conveniently edited and packaged in an ebook format (PDF, ePub, mobi). Fundamentas JavaScript syntax and patterns. Style and Organization Best practices and conventions. Tools Best tools for front and back-end development. Testing Test-Driven Development. Performance Performance tests and server-side memory testing. Node.js

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.

The Best Way to Learn JavaScript Learning something new is scary. For me, the biggest issue with picking up a new skill is that I don’t know what I don’t know. Given that, it’s often useful to find a plan for learning whatever you’re interested in. JavaScript is the language of the browser. Before you actually begin learning JavaScript, take a minute to understand what it is and does. JavaScript is not jQuery, Flash, or Java. JavaScript is the language of the browser (not exclusively these days, though). One more note: you’ve heard about jQuery, which is probably the most widely-used JavaScript library. You might even have heard someone say that you should start with jQuery (or another library) and learn JavaScript after. Codecademy is a relatively new website that bills itself as “the easiest way to learn how to code.” The folks at appendTo have a fantastic set of screencasts geared specifically for beginners. "Level up your skills with our on demand, pragmatic training solution. So, what can you build?

JS The Right Way How to Learn JavaScript Properly - Ray Sinlao Learn JavaScript Properly (For NON-JavaScript Programmers and First-time Programmers) Duration: 6 to 8 weeks. Prerequisite: Completed at least middle school (no programming experience necessary). Learn Intermediate and Advanced JavaScript (This links to a separate article) This course outline gives you a structured and instructive roadmap on how to learn JavaScript properly and thoroughly, from absolute beginner to attainment. You do want to learn JavaScript; it is why you are here, and you have made a wise decision, for if you want to develop modern websites and web applications (including an internet startup), you need to know JavaScript. It is worth noting that unlike just a couple of years ago when you needed to know a true server-side language (such as PHP, Rails, Java, Python, or Perl) to develop scalable, dynamic, database-driven web applications, today you can do as much and more with JavaScript alone. Side Note: This post was featured on Hacker News front page and onReddit.

Related: