[프로그래머스 | 자바스크립트] 가장 큰 수 찾기

목차

솔루션

const solution = (array) => {
  const answer = Math.max(...array);
  console.log(answer);
  const index = array.indexOf(answer);
  console.log(index);

  return [answer, index];
};