Functions with two parameters


#1

I'm stuck here..
https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/2/1?curriculum_id=506324b3a7dffd00020bf661#

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);

#2

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


#3

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


#4

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