Can you hack this? #2

alfredosalzillo

Alfredo Salzillo

Posted on April 25, 2021

Can you hack this? #2

Write an isEven function to check if a number is even without using the modulus operator.

const isEven = (n) => ...

isEven(2) // => true 
isEven('127') // => false
isEven('12abc2') // => false 
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
alfredosalzillo
Alfredo Salzillo

Posted on April 25, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Can you hack this? #2
challenge Can you hack this? #2

April 25, 2021