Preview:
/*
function functionName(parameter1, parameter2, parameter3) {
  body code goes here
}
Functions are "called" by entering function's name followed by invocation operator, (). "Invoke"/"execute" mean the same thing. Arguments that the function declaration expects should be passed inside of the invocation operator. Functions can, but are not obligated to, return return values at the end of their execution. Return values are often results of a process, grand totals, or success / failure data.
*/

function sayHi(name){
  console.log('Hello '+ name)
}
// sayHi('Ash')

const hiRose = function(){
  console.log('Hi Rose')
}
// hiRose()

const doMath = function(number, number2){
  return number * number2
}

let fiveByFive = doMath(5,5)

/* 	> fiveByFive
	> 25
    >
*/    
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter