Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Instruction

Functions in JavaScript

A function is a block of code that solves a dedicated problem and returns the solution to the calling statement. The function exists in its own context. Hence, functions divide massive programs into smaller 'bricks' which structure the software as well as the software development process.

Defining a Function

// define a function
function <function_name> (<parameters>) {
 <fun...