Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. function power(n, times) {
  2. if (times < 0 || typeof times !== "number") {
  3. return;
  4. };
  5. return times === 0? 1: n*(power(n, times - 1));
  6. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement