integer overflow in javascript

Write an iterative O(Log y) function for pow(x, y) Javascript