I'm a little confused about the difference between console.log and return, 1/14


In 1/14, the text says: " Make sure to return - don't use console.log( )!" What is the difference?


and this's also wrong. gotta know what's wrong.

var isEven = function(number) {
// Your code goes here!

if (isEven === true) {
return "firstsomething"
else {
return "secondsomething"
return false


and this is also wrong as this:

if (isEven === true) {

doesn't make sense. isEven is a function not a boolean so it will never be true also anything but the isNaN case should return a boolean instead of a string.


The difference betwenn console.log and return is that console.log is a output function that prints stuff to the console and return is a way to end a function and pass a value to the caller. It is not an output to the console and should not be confused with one. But you might see a returned statement on the console because of a console feature that echos the last used value. But again this has nothing to do with return and would work for any value except undefined.


Thanks a lot, that started to confuse me. :grinning: