Unlogical error message


#1



var perimeterBox =function(length, width)
{
    console.log(length+length+width+width);
};

perimeterBox(1,1);

I'm getting: "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."

but....It actually does return 4.


#2

Write return 2 * ( length + width ) instead of this line:


#3

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