Oops try again, it says


#1


introductions to functions,7. functions with two perameters


it says 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.


// Write your function starting on line 3

var perimeterBox = function(length, width){ 
return length * width;
perimeterBox(9, 3);
};


#2

The above will return the area, not the perimeter, which is a sum.

return 2 * (length + width);

#3

ok that helped but now it says:
Oops, try again. Make sure to call your perimeterBox function with any value for length and width.
below is my code\/

// Write your function starting on line 3

var perimeterBox = function(length, width){
return 2 * (length + width);
perimeter(7, 3)
}


#4

That line will not be inside the function body.

... function ( ... ) {

};

console.log(perimeterBox(7, 3));

#5

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