So I understand your algorithm is trying to make an exponential x ^ n (at least that's what the names of the variables and comments suggest).
Maybe you are not understanding what you should do or are having problems understanding the algorithm. Your comments do not agree with the code.
Anyway,
You should note that if the n exponent is even.
x ^ n = x ^ (n / 2) * x ^ (n / 2) // attention! use integer division
I also find it interesting that you change this part of the code. No split remainder is required 2 times.
if (isEven(n%2)===0){//aqui nao estou conseguindo. Por que se o numero é par ele não entra aqui =)
Do this:
if (isEven(n)!==0){