Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

java script functions?

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.

var parameterBox = function(length,width){

return (length+length+width+width);

};

parameterBox(3,9);

error: You did not define function perameter box

2 Answers

Relevance
  • Silent
    Lv 7
    8 years ago
    Favorite Answer

    It asks you to define a function called perimeterBox. You defined a function called parameterBox. See the difference?

    Precision is very important in programming.

  • Terry
    Lv 4
    8 years ago

    function perimeterBox(length,width)

    {

    return (length+length+width+width);

    }

    var result = perimeterBox(3,9);

Still have questions? Get your answers by asking now.