Functions with two parameters


I'm stuck here..

I get this error message no matter what parameters I try and put in..
"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."

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

perimeterBox(4, 4);


You made a typo. Your first parameter is called lenght, swap the last two letters.


Haha wow... always something silly like that. I guess that's what happens when you stay up late. Thanks!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.