Function with two parameters


var perimeterBox=function(length,width){
return length+length+width+width;
var =function();

Replace this line with your code.


The above line may be removed. It is throwing an exception.

A function call expression looks like this:


To log the return value, we can save it then log the saved value, or simply log the expression, itself.


In the exercise above, the function has two parameters, so our call expression needs to have two arguments to pass in to the function. Their values will be stored in the locally defined variables, length and width.

console.log(perimeterBox(7, 11));    // 36