myPow = (x, n) => {
    if (n < 0) {
        x = (1 / x);
        n = (-n);
    }

    let [ pow, product ] = [ 1, x ];

    for (let i = n; (0 < i); i = (i >> 1)) {/* Time O(log(N)) */
        const isOdd = ((i % 2) === 1);
        if (isOdd) pow = (pow * product);

        product = (product * product);
    }

    return pow;
}
Fast Power - Iterative
Time O(log(N)) | Space O(1)
https://leetcode.com/problems/powx-n/
@param {number} x
@param {number} n
@return {number}