This is my code for a leveling system (every level requires 4^level XP):
var x = 0; // x will change
var y = 0;
for (var i = 0; 4^i >= x; i++) {
y = i;
}
console.log(y);
However, when I run this code, it ends up freezing the page and making it unresponsive. I can only assume that it is an infinite loop. Is there a syntax error in this code?