일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- HTTP
- 리트코드
- js
- 정재남
- 4주 프로젝트
- 프로그래머스
- til
- 파이썬
- programmers
- 리액트
- codestates
- 제로초
- 2주 프로젝트
- 자바스크립트
- 렛츠기릿 자바스크립트
- 토익
- 타임어택
- 백준
- 코드스테이츠
- 타입스크립트
- SQL 고득점 Kit
- 알고리즘
- 리덕스
- 손에 익히며 배우는 네트워크 첫걸음
- python
- LeetCode
- 회고
- 타입스크립트 올인원
- javascript
- 코어 자바스크립트
- Today
- Total
목록전체 글 (500)
Jerry

function solution(my_string) { return [...my_string].map((el) => el.match(/[a-z]/g) ? el.toUpperCase() : el.toLowerCase()).join(''); }

function solution(cipher, code) { return [...cipher].reduce((a, c, i) => (i + 1) % code === 0 ? a + c : a + '', ''); }

function solution(order) { let arr = [...String(order)].map((el) => Number(el)); return arr.reduce((a, c) => c % 3 === 0 && c !== 0 ? a += 1 : a += 0, 0); } // 다른 풀이 function solution(order) { return [...order.toString().matchAll(/[3|6|9]/g)].length; }

function solution(array, n) { let min = 0; let arr = []; array.sort((a, b) => a - b).map((el, idx) => { if (el Math.abs(a - c) Math.abs(a - c) ? Math.min(a, c) : c); }

1. Set 생성자는 타입에 상관없이 오직 하나의 값만 저장하는 Set 객체 const my_string = "abc"; const setExample = new Set(my_string); console.log(setExample); console.log(...setExample); console.log([...setExample]); 예시) [출처] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/Set 2. Array.from() 메소드는 유사 배열 객체나 반복 가능 객체를 얕은 복사하여 새로운 Array 객체를 만듬 console.log(Array.from('foo')); console.log(..

function solution(sides) { sides = sides.sort((a, b) => b - a); return sides[0] < sides[1] + sides[2] ? 1 : 2; }

function solution(my_string) { let ans = []; for (let i of my_string.split('')) { if (ans.indexOf(i) === -1) ans.push(i); } return ans.join(''); }