본문 바로가기

hsunny study blog

검색하기
hsunny study blog
프로필사진 헤써니

  • 분류 전체보기 (101)
    • book (6)
      • The Practice of Programming (6)
    • programming (94)
      • javascript (22)
      • Angular (7)
      • RxJS (5)
      • IONIC (18)
      • PHP (7)
      • GIT (5)
      • html&css (4)
      • ERROR (9)
      • android (3)
      • etc (7)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2026/01   »
일 월 화 수 목 금 토
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
  • Ionic
  • 이미지바꾸기
  • zsh
  • change detection
  • Visual Studio Code
  • angular5
  • php
  • typescript
  • fromEvent
  • 테두리굵기
  • Sentry
  • angular
  • hashchange
  • oh-my-zsh
  • 자바스크립개념
  • Git
  • error
  • ChangeDetectorRef
  • rxjs
  • 변화감지
  • NVM
  • code .
  • getElementsByClassName
  • border-width
  • IONIC3
  • JavaScript
  • sealize
  • aab 배포
  • VSCode
  • ion-range
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록array (1)

hsunny study blog

배열 중복 요소 제거

Array.filter() 를 통해 배열에 존재하는 중복 요소를 제거할 수 있습니다. arr.filter(callback(element[, index[, array]])[, thisArg) filter() 메서드는 주어진 함수의 테스트를 통과하는 모든 요소를 모아 새로운 배열로 반환합니다. 문서보기 방법 Array.filter((item, index) => nums.indexOf(item) === index ) 예제 let nums = [1,1,2,5,1,3]; nums라는 배열에 1이 3개가 존재합니다. let filteredArray = nums.filter((item, index) => nums.indexOf(item) === index ); filter를 이용하여 새로운 변수 filteredArr..

programming/javascript 2019. 6. 17. 04:03
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바