Skip to Content
러닝 자바스크립트: ES6로 제대로 입문하는 모던 자바스크립트 웹 개발
book

러닝 자바스크립트: ES6로 제대로 입문하는 모던 자바스크립트 웹 개발

by 한선용, 이선 브라운
July 2017
Beginner to intermediate
464 pages
10h 38m
Korean
Hanbit Media, Inc.
Content preview from 러닝 자바스크립트: ES6로 제대로 입문하는 모던 자바스크립트 웹 개발
214
러닝 자바스크립트
every
는 배열의 모든 요소가 조건에 맞아야
true
를 반환하며 그렇지 않다면
false
를 반환합니
다.
every
는 조건에 맞지 않는 요소를 찾아야만 검색을 멈추고
false
를 반환합니다. 조건에 맞
지 않는 요소를 찾지 못하면 배열 전체를 검색합니다.
const
arr
= [
4
,
6
,
16
,
36
];
arr
.
every
(
x
=>
x
%
2
===
0
); //
true
; 홀수가 없습니다.
arr
.
every
(
x
=>
Number
.
isInteger
(
Math
.
sqrt
(
x
))); //
false
;
6
은 제곱수가 아닙니다.
이 장에서 소개하는 메서드 중 콜백 함수를 받는 모든 메서드가 그렇듯,
some
every
도 콜백
함수를 호출할 때
this
로 사용할 값을 두 번째 매개변수로 받을 수 있습니다.
8.4
map
filter
map
filter
는 배열 메서드 중 가장 유용한 메서드입니다. 이들 메서드로 할 수 있는 일은 정
말 다양합니다.
map
은 배열 요소를
변형
합니다. 무엇으로 변형하냐고요? 뭐든 가능합니다. 숫자가 들어있
는 객체가 있는데, 필요한 건 숫자라고요? 간단합니다. 함수로 구성된 배열이 있는데, 프라미
promise
가 필요하다고요? 간단합니다.
일정한 형식의 배열을 다른 형식으로 바꿔야 한다면
map
을 쓰십시오.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

웹 애플리케이션 보안: 정찰, 공격, 방어 세 단계로 배우는 웹 애플리케이션 보안의 모든 것

웹 애플리케이션 보안: 정찰, 공격, 방어 세 단계로 배우는 웹 애플리케이션 보안의 모든 것

최용, 앤드루 호프먼

Publisher Resources

ISBN: 9788968483387