Can some one help me with this question?


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.


Could you post your attempted code?


var perimeterBox = function ( length + length + width + width )

return (1+1+1+1);

i had a few other tries and all were syntax error


var permimeterBox = function(length, width){ //Declaring function with the parameters length and width.
    return (length + length + width + width); //Returning the perimeter using those values.


but how do you define the perimeterBox function?


var perimeterBox = function(...){...}