배열 길이를 넘어갈 때 순환 처리하는 방법 (% 연산자 활용)
프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr기존 코드function solution(s, n) { const upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; const lower = 'abcdefghijklmnopqrstuvwxyz'; function increaseItem(sItem, type) { const itemIndex = type.indexOf(sItem); const len = type.length; const increaseIndex = itemIndex + n > len - 1 ? itemIndex + n - l..