자바스크립트 외의 언어를 알고 있다면 좋은 자바스크립트 개발자가 되기 위해 배워야 할 것이
다섯 가지 있다. 스코프, 콘텍스트
context
, 프로토타입 상속
prototypal
inheritance
, 비동기
asynchrony
, 브라
우저
browser
DOM
이다.
자바스크립트의 모든 함수에는 프로퍼티
property
와 데이터 집합이 따라붙는다. 이런 것들을 함수
의
콘텍스트
라고 부른다. 콘텍스트는 고정된 것이 아니라 실행 중에 바뀔 수 있다. 함수의 콘텍
스트에 저장된 객체는
this
키워드를 사용해 참조된다.
const func = function() {
this.age = 25;
// 25를 반환
console.log(this.age);
};
// undefined를 반환
console.log(this.age);
콘텍스트와 관련된 버그를 찾는 일이 얼마나 성가신지는 상상할 수 있을 것이다. 특히 객체의 ...
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.
O’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
I 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
I’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
I'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.