Javascript - Program the Web
This course covers the basics of programming in Javascript. Work your way through the videos/articles and I'll teach you everything you need to know to make your website more responsive!

Functions

Lesson 12
Author : 🦒
Last Updated : October, 2017


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

Copyvar sum = addNumbers(4, 60);
document.write(sum);

function addNumbers(num1, num2){
     return num1 + num2;
}