7. return keyword


Write a function called perimeterBox that returns the perimeter of a rectangle.
It should have two parameters.
One formula for perimeter is length + length + width + width;
Call the function and pass in any value for length and width you like.

This is my code pls help what is my mistake
// Write your function starting on line 3
var perimeterBox = function(lenght, width) {
return length + length + width + width;



Hi this line

var perimeterBox = function(lenght, width)

you wrote lenght instead of length



thanks for helping me


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