Wrong thought process in syntax?


#1

My initial thought process was to make it

if (isEven%2)
return true

// then I tried

if (number%2)
return true

// after I went for

if (number === %2)
return true

// Then I checked out the Q&A and wondered why my last input did not work:

if (isEven %2 === 0)
return true

I know the answer is %2 === 0 because the remainder is 0 meaning. Why are the other options (especially the last) incorrect?

Thanks in advance.


#2

Can you like show your real code? It's hard to tell what's the real version or what is not. Like, was there really a "then" and "finally" in your code?


#3

you are right... sorry, I edited to make more sense, it was not all one code.