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).
- Raise the
baseto the power ofexp. - Return the explosive result.
01EXAMPLE 1
Input
base = 3, exp = 2Output
9Constraints
FundamentalsMath
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
base3
exp2
Expected Output
9
Click RUN to test your solution