Comments (3)
Q1. 코드의 실행 결과를 작성해주세요.
const arrayLike = {
0: 1,
1: 2,
2: 3,
length: 3
};
for(let i=0; i < arrayLike.length; i++) {
console.log(arrayLike[i]);
} // (1)
for(const item of arrayLike) {
console.log(item);
} // (2)
정답
(2) TypeError, 유사 배열 객체는 이터러블이 아닌 일반 객체이기 때문이다.
from js-deep-dive-study.
Q1. 이터레이션 프로토콜은 어떤 역할을 할까요?
정답
from js-deep-dive-study.
Q1. 다음중 유사배열 객체에 대한 설명으로 알맞지 않은 것은?
- 유사배열 객체는 인덱스로 프로퍼티에 접근할 수 있다.
- Array.from 메서드로 배열로 변환할 수 있다.
- for...of 문으로 순회할 수 있다.
- for문으로 순회할 수 있다.
정답
from js-deep-dive-study.
Related Issues (20)
- [21장] 빌트인 객체 HOT 5
- [22장] this HOT 5
- [23장] 실행 컨텍스트 HOT 5
- [24장] 클로저 HOT 5
- [25장] 클래스 HOT 5
- [26장] ES6 함수의 추가 기능 HOT 5
- [33장] 7번째 데이터 타입 Symbol HOT 3
- [35장, 36장] 스프레드 문법, 디스트럭처링 할당 HOT 3
- [37장] Set과 Map HOT 2
- [38장] 브라우저의 렌더링 과정 HOT 3
- [39장] DOM HOT 3
- [40장] 이벤트 HOT 4
- [41장, 42장] 타이머, 비동기 프로그래밍 HOT 4
- [43장] Ajax HOT 4
- [44장] REST API HOT 4
- [45장] 프로미스 HOT 2
- [46장] 제너레이터와 async/await HOT 1
- [47장] 에러처리 HOT 1
- [48장] 모듈 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-deep-dive-study.