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.
Trending News
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
- SilentLv 78 years agoFavorite 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.
- TerryLv 48 years ago
function perimeterBox(length,width)
{
return (length+length+width+width);
}
var result = perimeterBox(3,9);
Source(s): http://www.w3schools.com/js/js_functions.asp