Lesson 9 functions with two parameters


I'm really not sure what I've done wrong here but I'm probably missing something obvious. I've tried with and without the console.log in parantheses and I'm still getting the error message about "Did you define a perimeterBox function?" although it clearly is defined! Thankyou in advance


Oops, try again. Did you define a perimeterBox function?

// Write your function starting on line 3

var perimeterBox = function(length, width)

    return length + length + width + width ;

console.log(perimeterBox = (4,5));


You create a function and assign it to the right name. Then you assign another value to the same name, so indeed, it no longer refers to a function.


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