Code Monkey home page Code Monkey logo

Comments (3)

Heojiyeon avatar Heojiyeon commented on August 21, 2024

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)
정답
(1) 1 2 3
(2) TypeError, 유사 배열 객체는 이터러블이 아닌 일반 객체이기 때문이다.

from js-deep-dive-study.

choibyeol avatar choibyeol commented on August 21, 2024

Q1. 이터레이션 프로토콜은 어떤 역할을 할까요?

정답
이터레이션 프로토콜은 다양한 데이터 공급자가 하나의 순회 방식을 갖도록 규정해 데이터 소비자가 효율적으로 다양한 데이터 공급자를 사용할 수 있도록 데이터 소비자와 데이터 공급자를 연결하는 인터페이스의 역할을 한다.

from js-deep-dive-study.

SDWoo avatar SDWoo commented on August 21, 2024

Q1. 다음중 유사배열 객체에 대한 설명으로 알맞지 않은 것은?

  1. 유사배열 객체는 인덱스로 프로퍼티에 접근할 수 있다.
  2. Array.from 메서드로 배열로 변환할 수 있다.
  3. for...of 문으로 순회할 수 있다.
  4. for문으로 순회할 수 있다.
정답
3. for...of 문으로 순회할 수 없습니다!!

from js-deep-dive-study.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.