You are viewing a single comment's thread. Return to all comments →
Javascript solution:
simplest to go with
// Write your code here let arr = [] function getP(n) { return p.indexOf(n)+1 } for(let x = 1; x<= Math.max(...p); x++){ arr.push(getP(getP(x))) } return arr
Seems like cookies are disabled on this browser, please enable them to open this website
Sequence Equation
You are viewing a single comment's thread. Return to all comments →
Javascript solution:
simplest to go with