JS exponent function