문제 링크 :
https://school.programmers.co.kr/learn/courses/30/lessons/120899
max()
메서드로 array에서 가장 큰 수를 찾는다.
숫자는 중복이 없으므로 array에서 제일 큰 수의 index를 찾는다.
function solution(array) {
const max = Math.max(...array);
const answer = [max, array.indexOf(max)]
return answer
}