The Power Surge

Easy+15 XP

Mission Briefing

The reactor's power output must grow exponentially to break through the storm shield! Standard multiplication won't be enough.

The Concept: Exponentiation

To calculate powers (like 2 to the power of 3), modern JavaScript uses the ** operator, which is the exponentiation shorthand. 2 ** 3 equals 8.

The Objective

Your function receives a base and an exp (exponent).

  1. Raise the base to the power of exp.
  2. Return the explosive result.

01EXAMPLE 1

Inputbase = 3, exp = 2
Output9

Constraints

    FundamentalsMath
    JavaScript
    Loading...
    3 Hidden

    Input Arguments

    base3
    exp2

    Expected Output

    9

    Click RUN to test your solution