Functions
Lesson 12Author : Afrixi
Last Updated : October, 2017
Table of Content
sayHi()
sayHi("Mike")
A parameter is a special variable that a Function will use to perform it’s task in a way that is more specific to the needs of the caller. An argument is the value the caller gives to the Function which will get stored inside the parameter variable.
sayHi("Mike", 24)
Code
var sum = addNumbers(4, 60);
document.write(sum);
function addNumbers(num1, num2){
return num1 + num2;
}