Introduction to Functions in JavaScript

The aim of this post is to introduce people quickly into the wonderful world of JavaScript functions. Functions are one of the core aspects in JavaScript.

A function is a set of statements that performs a task or calculates a value. Once you start to get your head around very basic JavaScript you will certainly need to invest some time into learning the in’s and out’s of functions. Basically, anytime you find yourself repeating code, but modifying the small parts, you could probably use a function.