Lesson 1: Maximum call stack size exceeded


#1



This keeps saying "Oops, try again. It looks like you have an error in your code! See the error message for more: RangeError: Maximum call stack size exceeded

Why is this happening?


var isEven = function(number) {
  isEven(6) // Your code goes here!
  if(number%2 === 0) {
    return true; }
 else { 
  return false; }
};
isEven(0);


#2

Ok basically this is a function infinity loop... See this?

Yea everytime you call the function it calls it self... So it just calls isEven(6) like a 10000000000000 times, and gives you that error.