Strictly Javascript

There comes a time with a large Javascript project where having the code behave more like a 'usual' programming language becomes useful.  This is where 'strict mode' comes in. Javascript is very forgiving.  Take the following: No problem.  Yet programming from other languages will throw their arms in horror - The Variable has not been...

Read More

How do you function?

Javascript functions can be written in a number of different ways. Function declarations Firstly we have the 'classic' named function: This technique is known as a 'function declaration'. JSFIDDLE Demo Function Expressions Then we have the anonymous function: The above function has no name and is associated with an event. This technique is a type...

Read More

Javascript Prototypes

Classes, Properties, Methods and Ships Javascript is an object oriented (OO) programming language. Many object oriented programming languages, such as Java and ActionScript, are class based. A 'class' acts as a blueprint for objects or instances created from the blueprint. We may, for example, have a class 'Ship' that defines the basic characteristics of a...

Read More