JS 알고리즘 100일 챌린지 문법 정리
·
Programming/JavaScript
Javascript 알고리즘 100일 챌린지를 통해 기본적인문제 풀이시 몰랐던 문법요소 정리 유튜브 참고 : https://www.youtube.com/watch?v=RMmOU2u-_as&list=PLkfUwwo13dlWZxOdbvMhkzhAowaiEjuGS Array값에 요소값 채우기 (fill & map) let arr = Array(10).fill().map((_,i)=> i); //[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 누적값 구하기 (reduce) const initialValue = 0; const sumWithInitial = [1,2,3,4,5].reduce( (accumulator, currentValue) => accumulator + currentValue, initi..