Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function power(n, times) {
- if (times < 0 || typeof times !== "number") {
- return;
- };
- return times === 0? 1: n*(power(n, times - 1));
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement