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 |
Tags
- Eventlitener
- sort()
- Math.floor()
- filter()
- charAt()
- substring()
- toUpperCase()
- map()
- useRef()
- new Date()
- React
- setDate
- includes()
- useState()
- 3진수
- Number()
- isNaN()
- slice()
- jsx반복문
- indexOf()
- useEffect()
- getday()
- 소수점 올림내림
- 항해99솔직후기 #항해99장점 #항해99단점 #부트캠프추천
- parseInt()
- 교집합
- Math.sqrt()
- reat if문
- 차집합
- repeat()
Archives
- Today
- Total
목록repeat() (1)
개발자로 전향중

문제 설명 프로그래머스 모바일은 개인정보 보호를 위해 고지서를 보낼 때 고객들의 전화번호의 일부를 가립니다. 전화번호가 문자열 phone_number로 주어졌을 때, 전화번호의 뒷 4자리를 제외한 나머지 숫자를 전부 *으로 가린 문자열을 리턴하는 함수, solution을 완성해주세요. 제한 조건 s는 길이 4 이상, 20이하인 문자열입니다. 입출력 예phone_numberreturn "01033334444" "*******4444" "027778888" "*****8888" function solution(phone_number) { var answer = '*'.repeat(phone_number.length-4)+phone_number.slice(-4); //뒤에서 4번째까지 자름 return ans..
자료구조&알고리즘
2022. 1. 19. 17:37