17.중복단어제거 function solution(s) { let answer; answer = s.filter(function (v, i) { return s.indexOf(v) === i; }); return answer; } let str = ["good", "time", "good", "time", "student"]; console.log(solution(str)); filter 함수로 배열을 돌면서 단어가 첫번째로 나오는 인덱스와 filter 함수를 도는 인덱스가 같으면 v를 리턴한다.