1/14 Whats wrong with my Code?


var isEven = function(number) {
return number * 2;// Your code goes here!
var newNumber =

if (newNumber%2 = 0) {
// Use console.log() to print "Slow down"
console.log("The number is bigger than my age!");
else {
// Use console.log() to print "Drive safe"
console.log("The number is smaller than my age!");
Whenever I try to run this code it says 'ReferenceError: isEven is not defined
ReferenceError: Invalid left-hand side in assignment'. What is it that I'm doing wrong?


My 1/14 is different than yours... but let's try debugging!:smiley:

Follow directions. It says to print "Slow down", so to pass the level you have to print "Slow down".

Same goes here:


This '=' is NOT a comparator. One equal sign means something like "is". To make it work, you must use '===', which means "equal to in value and type".

Also, can't you just take out this:

and just replace the newNumber in this:

Into isEven.