This if statement is allows the value to be float. You should add a strict check for int. Maybe `N % 1 === 0`