
// javascript
const solution = (my_string, indices) => {
return Array.from(my_string)
.filter((_, index) => !indices.includes(index))
.join('');
}
// typescript
const solution = (my_string:string, indices:nubmer[]):string => {
return Array.from(my_string)
.filter((_, index) => !indices.includes(index))
.join('');
}
'프로그래머스(코딩 테스트) > Lv.0' 카테고리의 다른 글
꼬리 문자열 (0) | 2024.10.19 |
---|---|
이어 붙인 수 (1) | 2024.10.19 |
부분 문자열 이어 붙여 문자열 만들기 (1) | 2024.10.19 |
조건 문자열 (1) | 2024.10.19 |
부분 문자열 (0) | 2024.10.19 |