@CodeRed_dev If the number leave a remainder when divided( or is an odd number), return false. Otherwise, return true. I could be wrong but, that's the pattern I'm seeing.
@CodeRed_dev You can put all the comparisons for even in one if with || and then the else is odd because obviously you've just tested all the evens. It'll probably save you a bit on typing that way
@CodeRed_dev Programming is all about noticing interesting properties, here is how you can make the code much better:
return str(number)[-1] in '02468'
@CodeRed_dev the good thing is you only have to do this once for all possible numbers and then export it as an npm package that you can install in every single project of yours