[프로그래머스] k 번째 수 (javascript)

function solution(array, commands) { var answer = []; for(let i=0;ia-b); answer.push(arr[c-1]); } return answer; }