Skip to Content
자바스크립트 완벽 가이드
book

자바스크립트 완벽 가이드

by David Flanagan, Han Seon- yong
February 2022
Beginner to intermediate
784 pages
24h 53m
Korean
Insight
Content preview from 자바스크립트 완벽 가이드
the De󼴩nitive Guide
255
8.9 요약
9
장
JavaScript The Definitive Guide
클래스
6장에서 자바스크립트 객체에 대해 설명하면서 객체는 프로퍼티의 고유한 집합이
며 다른 어떤 객체와도 같지 않다고 했습니다. 하지만 일부 프로퍼티를 공유하는
객체 클래스를 만드는 것이 유용할 때도 많습니다. 클래스의 인스턴스는 자신의 상
태를 정의하는 자체 프로퍼티도 갖지만, 자신의 동작을 정의하는 메서드도 가집니
다. 이런 메서드는 클래스에서 정의하며 모든 인스턴스에서 공유합니다. 복소수
(complex number)를 나타내며 복소수 계산을 담당하는
Complex
라는 클래스가 있
다고 상상해 보십시오.
Complex
인스턴스에는 복소수의 실수와 허수 부분(상태)을
나타내는 프로퍼티가 있을 겁니다. 또한
Complex
클래스에는 복소수의 덧셈과 곱
셈(동작)을 담당하는 메서드를 정의할 겁니다.
자바스크립트 클래스는 프로토타입 기반 상속을 사용합니다. 두 객체가 같은 프
로토타입에서 프로퍼티(일반적으로 함수 값인 프로퍼티나 메서드)를 상속한다면
이들을 같은 클래스의 인스턴스라고 부릅니다. 간단히 말해 자바스크립트 클래스
는 이런 식으로 동작합니다. 자바스크립트 프로토타입과 상속은 6.2.3절과 6.3.2절
에서 설명했으며, 이 장을 이해하기 위해서는 ...
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

개발자를 위한 필수 수학

개발자를 위한 필수 수학

토머스 닐드
개발 7년차, 매니저 1일차

개발 7년차, 매니저 1일차

권원상, 한민주, 카미유 푸르니에

Publisher Resources

ISBN: 9788966263462