Practice exercise - Functions & Arrays 38

I got a problem with the exercise number 38 (Functions & Arrays).
The solution is:

function longerThanNumber(string, number) {
let answer = (string.length > number);
return answer;

but when I try and console.log(answer); the program says that answer is not defined. I don’t get it - Answer IS defined and returned from the function. Maybe I am blind to see what’s wrong, but that’s not too much code I think :smiley:

1 Like

You just need to console.log(longerThanNumber("test", 3)) the function.

Carlos Z.