반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- dfs
- BFS
- Algorithm
- typescript
- 백준
- HTTP 완벽 가이드
- 알고리즘
- 타입스크립트
- ip
- 자바스크립트
- Node.js
- HTTP
- TCP
- 쉬운 문제
- 크롤링
- dp
- 가천대
- 그래프
- 프로그래머스
- 프로그래머스 레벨 2
- 레벨 1
- Nestjs
- 수학
- 타입 챌린지
- socket
- type challenge
- 소켓
- javascript
- 문자열
- Crawling
Archives
- Today
- Total
목록나머지 연산자 (1)
kakasoo

// 프로그래머스 레벨1 핸드폰 번호 가리기를 풀었습니다. function solution(phone_number) { let a, b, c, d, e; let arr = ([a, b, c, d, ...e] = phone_number.split("").reverse()); return [e.map((el) => "*").join(""), d, c, b, a].join(""); } 구조분해할당과 나머지 연산자를 이용하면 쉽게 가능해진다.
프로그래밍/알고리즘 풀이
2021. 6. 28. 15:37