5 XP challenge
Repeat Multiplication
very easy
Build it yourself · 3 min
1 Learn2 Predict3 Solve
TaskYour mission
Return factor raised to the nonnegative integer exponent. factor is -3 to 3; exponent is 0 to 8. Define exponent=0 to return 1, including factor=0.
Examples
| Input | Return |
|---|---|
factor = 2, exponent = 3answer: 1 → 2 → 4 → 8. The result is 8. | 8 |
factor = 3, exponent = 0 | 1 |
Your code
Write your answer inside Solution, then use return to send it back.
Ln 1, Col 1
JavaScript
Try examples runs the public examples. Check my code checks your full answer and saves your completion.