Create Three Simple Functions
One function that adds 1 and 2 together using Function Declaration.
One function that subtracs 10 from 20 using Function Expression.
One function that calculates the area of a square using an outside variable, using either function declaration or expression.
If you have completed this activity, work through the following to further your knowledge:
return
?Use Google or another search engine to research this.
function addOneAndTwo() {
console.log(1+2);
return
}
var subtractTwentyAndTen = function() {
console.log(20-10);
return
}
var side = 54;
function areaOfASquare() {
var area = side * side;
console.log('area: ', area)
return
}
addOneAndTwo();
subtractTwentyAndTen();
areaOfASquare();