Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 411 Bytes

File metadata and controls

18 lines (11 loc) · 411 Bytes

Power

Instructions

Given positive integer base and positive integer exponent implement a function which calculates power of base of exponent. This function should mimic functionality of Math.pow.

challenge | solution

Examples

power(2, 1) // 1

power(2, 2) // 4

power(3, 3) // 27