공부/프로그래머스

프로그래머스 - 코딩테스트 연습>코딩테스트 입문>암호 해독

da_won_2023 2023. 8. 17. 23:46
SMALL
function solution(cipher, code) {
    return cipher.split("").map((str, idx) => (idx + 1) % code === 0 ? str : "").filter(str => str !== "").join("");
}
LIST