My result is printing out twice and I d


9. Functions with 2 parameters

It saying my perimeterBox did not return the correct value of 4 - it did, it just returned it twice

Replace this line with your code. 

var perimeterBox = function (length, width) {
var val = (width+length+width+length);


Actually, the error message is correct. Your function does not return anything, only logs it. When the lesson checker runs the program it logs again, that's the second output you are seeing.

    return 2 * ( length + height );

will return the value, not log it. if you want it to print, log the call expression.

console.log(perimeterBox(1,1));    // 4

A question of coding