background preloader

Javascript

Facebook Twitter

Get Value of CSS Rotation through JavaScript. Terse JavaScript 101 – part 2. Part one, posted last week, explored a few different ways of de-cluttering your JavaScript, and, in the process, making it more readable.

Terse JavaScript 101 – part 2

Some developers don’t like the idea of using a language’s more idiosyncratic features because it does, potentially, make your code less readable in the eyes of those who haven’t learned the language properly. I think it’s still up for debate. While you’re pondering that, part II awaits… If you haven’t checked out the “Truthy & Falsey” introduction then please do so before continuing. Looping It’s something we barely think about but JavaScript’s expressive diversity allows us to invent new patterns for looping. For (var i = 0; i < array.length; i++) {} This is conventional and will be known to developers coming from any language.

The first improvement I usually make is to cache the length property of the array: for (var i = 0, l = array.length; i < l; i++) {} This doesn’t make it shorter, but it does make it more efficient, although marginally so… Assignments. Jsmart - JavaScript template engine, port of the PHP template engine Smarty to Javascript, lets you use the same templates for PHP and JavaScript, on both server and client-side. 33 Developers you MUST Subscribe to as a JavaScript Junkie. A re-introduction to JavaScript. Why a re-introduction?

A re-introduction to JavaScript

Because JavaScript is notorious for being the world's most misunderstood programming language. It is often derided as being a toy, but beneath its layer of deceptive simplicity, powerful language features await. JavaScript is now used by an incredible number of high-profile applications, showing that deeper knowledge of this technology is an important skill for any web or mobile developer.

It's useful to start with an overview of the language's history. JavaScript was created in 1995 by Brendan Eich while he was an engineer at Netscape. Several months later, Microsoft released JScript with Internet Explorer 3. Because it is more familiar, we will refer to ECMAScript as "JavaScript" from this point on. Unlike most programming languages, the JavaScript language has no concept of input or output.

Overview JavaScript is a multi-paradigm, dynamic language with types and operators, standard built-in objects, and methods. And there are some built-in Error types as well. AppendTo Developer Learning Center. Learn to code. The Best Way to Learn JavaScript. Learning something new is scary.

The Best Way to Learn JavaScript

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. That’s what this post is: your blueprint, your roadmap, your plan of action for learning JavaScript! You don’t have to worry about finding the best resources, sorting out the bad ones, and figuring out what to learn next. It’s all here. 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.

A handful of good introductions, if I may: So, what can you build? Stop Nesting Functions! (But Not All of Them)