Recursive ternary

PHOTO EMBED

Wed Nov 25 2020 21:03:04 GMT+0000 (Coordinated Universal Time)

Saved by @ryan #javascript

function pow(x, n) {
  return (n == 1) ? x : (x * pow(x, n - 1));
}
content_copyCOPY

https://javascript.info/recursion