Six ways to declare JavaScript functions

A function is a parametric block of code defined one time and called any number of times later. In JavaScript a function is composed and influenced by many components: JavaScript code that forms the function body The list of function parameters The variables accessible from the outer scope The returned value The context this when […]

Overview of ECMAScript 2015

What’s in a name? As of June 2015, the largest addition to the JavaScript language was finalized. The official name is ECMAScript 2015, sometimes referred to as “ES6”, or now more commonly known as “ES2105”. It is the culmination of years of work and features. Moving forward, there will be ECMAScript 2016, which will likely […]

JavaScript Functions

Function Declarations and Expressions Functions in JavaScript are first class objects. That means they can be passed around like any other value. One common use of this feature is to pass ananonymous function as a callback to another, possibly an asynchronous function. The function Declaration function foo() {} The above function gets hoisted before the […]

HTML5 Canvas element

The HTML 5 canvas specification has introduced a slew of new and exciting technologies to the web. Here we’ll expand on just one: the Canvas API. It’s for drawing pretty, whizzy things. Canvas is a new DOM API for drawing on a 2- or 3-dimensional (you guessed it) canvas. What follows just looks at the […]