8 kyu · reference

N-th Power

FundamentalsArrays

Removed due to copyright infringement.

Solutions

01-solution.jsView on GitHub ↗
function index(array, n) {
  if (array.length <= n) {
    return -1;
  }
  return Math.pow(array[n], n);
}