일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- java
- useDispatch
- Get
- 매일메일
- redux-saga
- json-server
- sw expert academy
- 항해플러스
- axios
- 알고리즘
- react-router
- C++
- 코딩테스트합격자되기
- redux
- redux-toolkit
- JavaScript
- 테코테코
- 항해99
- 프로그래머스
- Algorithm
- react
- createSlice
- 이코테
- Python
- react-redux
- SW
- maeil-mail
- 자바
- 리액트
- programmers
- Today
- Total
목록array (3)
Binary Journey

document.querySelectorAll document.getElementsByName 으로 개체를 가져오면 크롬이나 다른 웹브라우저에서는 NodeList 의 forEach를 지원해주는데 Internet Explorer 는 지원해주지 않아서 안된다. 찾아보면 ie9 이상이면 된다고 하지만 나는 ie11을 사용하는데도 안됨^^ https://stackoverflow.com/questions/46929157/foreach-on-queryselectorall-not-working-in-recent-microsoft-browsers forEach on querySelectorAll not working in recent Microsoft browsers I am making a script for cho..
프로그래머스에서 풀다 막힌 문제인데 내 첫 식은 이랬다. function solution(bridge_length, weight, truck_weights) { let seconds = 0; let onBridge = [ ...truck_weights ]; do { let sumWeight = onBridge.reduce((accumulator, currentValue) => accumulator + currentValue, 0); if (sumWeight + waitings[0] 0); do { onBridge.shift(); seconds++; if (truck_weights.length) { let sumWeight = onBridge.reduce((accumulator, currentValue) ..

Javascript 쓰다 보면 [] (Array)를 쓸 일이 굉장히 많다. 그리고 array 값 중 중복된 값들을 제거하고 싶을 때가 온다. 일단 array 내 element 가 object 가 아님을 전제로 하였을 때 new Set() 를 사용한다. set 객체는 자료형에 상관없이 유일한 값만 저장시킨다고 모질라에 나와있지만 확인 결과, object 형식은 안되는 것 같다. var arr = []; for (var i = 0; i < 5; i++) { arr.push("a"); } var newArr = [...new Set(arr)]; console.log("===== String ====="); console.log(newArr); console.log("===== String ====="); va..