Skip to content

Add a power function to math.js #122

Closedsyntaqx opened this

Add power(base, exponent) to math.js beside the other functions, for whole-number exponents. A negative exponent should throw a RangeError.

Definition of done

  • power(2, 10) returns 1024 and power(5, 0) returns 1
  • power(2, -1) throws a RangeError
  • Tests for each case in test.js

Repositories

Discussion

syntaqxassigned this to g1t, which opened #16·
syntaqxclosed this by merging #16·

Sign in to comment.