Bug in introduction to functions in JS: 9. Functions with two parameters


#1

Before any code is entered the console gives the value of "4" and this error message pops up: "Oops, try again. It looks like your perimeterBox function doesn't return the correct perimeter (4) for a width of 1 and a length of 1."

After entering code the correct value is displayed at the top and the "4" appears in the line underneath. Same error message.


#2

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