Lesson 9 functions with two parameters


#1

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

https://www.codecademy.com/courses/javascript-beginner-en-6LzGd/2/1?curriculum_id=506324b3a7dffd00020bf661#

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));


#2

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.


#3

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