인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

272
Basic Javascript for Impatient Programmers 개개개개개 http://engfordev.com

Upload: nasol-kim

Post on 21-Dec-2014

2.640 views

Category:

Documents


5 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Basic Javascript for Impatient Programmers

개발자영어http://engfordev.com

Page 2: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

만든 계기

• https://www.facebook.com/groups/codingeverybody/permalink/689851274388745/

• @cha Seoh 님이 이런 글을 공유해주셨는데 , 영어 공부에 활용하는 자료를 만들면 어떨까 해서 만들다가 졸려서 다 못만들었구요 , 일단 자려구요 .

Page 3: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

• 영어 문장과 단어 뜻을 보고 , 의미를 잠깐 생각해 봅니다 .

• 다음 장으로 넘어가서 , 내가 생각한 의미와 비교해 봅니다 .

공부하는 방법

Page 4: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

• 슬라이드가 약 270 장입니다 .

• 어떤 분은 10 분동안 집중해서 읽으셨는데 70 슬라이드 보셨다고 했어요 .

• 한번에 다 보겠다 욕심내지 마시고 , 건강 안구생활을 위하여 한 10 분 보시고 , 드라마 한편 보시고 , 또 10

분 보시고…

주의하세요 .

Page 5: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

• 좀 보시고 나서 , – 공부하기에 도움이 되는 것 같다 .. – 또는 이러면 더 도움이 될 것 같다 .. – 이렇게 공부했더니 도움이 되더라 , 등등 생각드는게 있으시면 ,

• 개영페북에 코멘트 부탁해용https://www.facebook.com/groups/engfordev/permalink/661981877186974/

부탁합니다

Page 6: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

patient : 인내심 많은

impatient: 인내심 없는

Basic JavaScript for the impatient programmer

Page 7: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

patient : 인내심 많은

impatient: 인내심 없는

Basic JavaScript for the impatient programmer

인내심 없는

프로그래머를 위한

자바스크립트 기초

Page 8: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

concise : 간결한

write up : 문서

I am aware of (A) : 나는 (A) 에 대해 인지하고 있다 .

“Basic JavaScript” is the most complete and concise write up that I am aware of.

Page 9: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

concise : 간결한

write up : 문서

I am aware of (A) : 나는 (A) 에 대해 인지하고 있다 .

“Basic JavaScript” is the most complete and concise write up that I am aware of.

" 기초 자바스크립트 ".. 는

내가 알고 있는 것중

가장 완전하고 간결한 글이다 .

Page 10: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to enable (A) to (B) : (A)

가 (B) 하게 해주다 .

as quickly as possible:

최대한 빨리

get started with : ~ 을 하기 시작하다 .

This blog post enables you to get started with JavaScript as quickly as possible.

Page 11: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to enable (A) to (B) : (A)

가 (B) 하게 해주다 .

as quickly as possible:

최대한 빨리

get started with : ~ 을 하기 시작하다 .

This blog post enables you to get started with JavaScript as quickly as possible.

이 블로그 포스트는

여러분이 자바스크립트를

최대한 빨리

시작할 수 있도록 해준다 .

Page 12: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

already : 이미

– if you already know how to pro-gram.

Page 13: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

already : 이미

– if you already know how to pro-gram.

- 이미 프로그램을 짤 줄 안다면

Page 14: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to describe : 기술하다

the smallest : 가장 작은

subset : 부분집합

This post describes the smallest subset of the language

Page 15: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to describe : 기술하다

the smallest : 가장 작은

subset : 부분집합

This post describes the smallest subset of the language

이 블로그 포스트는

자바스크립트언어의

가장 작은 부분집합을

기술합니다 .

Page 16: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

It allows you to be pro-

ductive. 그것은 여러분이 생산성이 높도록 해줍니다 .

This post describes the smallest subset of the language that allows you to be productive.

Page 17: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

It allows you to be pro-

ductive. 그것은 여러분이 생산성이 높도록 해줍니다 .

This post describes the smallest subset of the language that allows you to be productive.

이 블로그포스트는

이 언어중에서도

여러분의 생산성을 높여주는

가장 작은 부분집합을 기술합니다 .

Page 18: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

I call you baby.

나는 당신을 baby 라고 부른다 .

I call that subset “Basic JavaScript”

Page 19: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

I call you baby.

나는 당신을 baby 라고 부른다 .

I call that subset “Basic JavaScript”

저는 그 부분집합을

“ 자바스크립트 기초 " 라고

부르는 거구요 .

Page 20: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

for a while: 당분간

And I recommend to program in it for a while.

Page 21: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

for a while: 당분간

And I recommend to program in it for a while.

그리고 저는 당분간은

그것 (Basic JavaScript) 내에서

프로그래밍하기를 권합니다 .

Page 22: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to move on : 넘어가다 .

나아가다 .

, before moving on to more details and advanced top-ics.

Page 23: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to move on : 넘어가다 .

나아가다 .

, before moving on to more details and advanced top-ics.

좀 더 자세하고 , 어려운 내용으로 넘어가기 전에는 말이죠 .

Page 24: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

I call that subset “Basic JavaScript” and recommend to program in it for a while, before moving on to more details and advanced topics.

Page 25: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

I call that subset “Basic JavaScript” and recommend to program in it for a while, before moving on to more details and advanced topics.

저는 그 부분집합을 " 자바스크립트 기초 " 라고 부르며 ,

당분간은 이것 내에서 프로그래밍하기를 권합니다 .

좀 더 자세하고 어려운 내용으로 나아가기 전에는 말이죠 .

Page 26: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

at once: 한 번에

too confusing : 너무 혼란스러운

Learning everything at once is too confusing.

Page 27: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

at once: 한 번에

too confusing : 너무 혼란스러운

Learning everything at once is too confusing.

한번에 모든 것을 배우는 것은

너무 혼란스럽잖아요 .

Page 28: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to conclude with : ~

으로 끝맺다 .

The post concludes with tips.

Page 29: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to conclude with : ~

으로 끝맺다 .

The post concludes with tips.

이 포스트는 팁으로 끝맺습니다 .

Page 30: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The post concludes with tips for what to learn next.

Page 31: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The post concludes with tips for what to learn next.

이 포스트는

다음에 무엇을 배울지에 대한

팁으로 끝맺습니다 .

Page 32: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

below: 아래에서

to describe : 기술하다 rule-of-thumb :

대충이지만 실제에 근거한 방법

Warning: Below, I’m describing rules of thumbs and best practices.

Page 33: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

below: 아래에서

to describe : 기술하다 rule-of-thumb :

대충이지만 실제에 근거한 방법

Warning: Below, I’m describing rules of thumbs and best practices.

주의 : 아래에서 ,

저는

대략적인 규칙과 모범 사례를

기술하고 있습니다 .

Page 34: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to favor (A) over (B):

(A) 를 선호하다 , (B) 보다

I favor clarity over precision.

Page 35: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to favor (A) over (B):

(A) 를 선호하다 , (B) 보다

I favor clarity over precision.

저는

정밀한 것보다는

명료한 것을 선호합니다 .

Page 36: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

a matter of taste :

취향의 문제

The rules are safe, but a matter of taste.

Page 37: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

a matter of taste :

취향의 문제

The rules are safe, but a matter of taste.

제가 제시하는 규칙들은 안전합니다만 ,

( 사용할지 여부는 ) 취향의 문제죠 .

Page 38: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

convention : 관행

Conventions (which was) used in this blog post

Page 39: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

convention : 관행

Conventions (which was) used in this blog post

이 포스트에서 사용된 관행들

Page 40: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Command line interaction

커맨드라인 인터렉션

Page 41: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

whenever I do it : 내가 그것을 할 때 마다 con-

cept : 개념

Whenever I introduce a new con-cept,

Page 42: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

whenever I do it : 내가 그것을 할 때 마다 con-

cept : 개념

Whenever I introduce a new con-cept,

제가 새로운 개념을

소개할 때 마다

Page 43: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

I try to illustrate :

묘사하려고 노력합니다 .

I try to illustrate it via an interaction.

Page 44: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

I try to illustrate :

묘사하려고 노력합니다 .

I try to illustrate it via an interaction.

저는 그것을

인터렉션을 통해서

보여주려고 노력합니다 .

Page 45: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Whenever I introduce a new con-cept, I try to illustrate it via an interaction in a JavaScript command line.

Page 46: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Whenever I introduce a new con-cept, I try to illustrate it via an interaction in a JavaScript command line. 제가 새로운 개념을 소개할 때 마다 ,

자바스크립트 커맨드 라인에서

인터렉션을 통해서 보여주려고 합니다 .

Page 47: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

This looks as follows:> 3 + 4 7

Page 48: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

This looks as follows:> 3 + 4 7

이것은 아래와 같이 보입니다 .

> 3 + 4

7

Page 49: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The text after the greater-than character is the input,

Page 50: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The text after the greater-than character is the input,

‘~ 보다 큰’ 문자 뒤에 나오는 텍스트는

input 이고요 ,

Page 51: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

(which is) typed by a human

Page 52: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

(which is) typed by a human

인간에 의해 타이핑 된

Page 53: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The text after the greater-than character is the input, typed by a human.

Page 54: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The text after the greater-than character is the input, typed by a human.

‘>’ 기호 뒤에 나오는 텍스트는 in-

put 이고 ,

인간에 의해 타이핑 된 것이구요 .

Page 55: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

everything else : 그 외에 모든 것

Everything else is output.

Page 56: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

everything else : 그 외에 모든 것

Everything else is output.

그외 모든 것은 output 입니다 .

Page 57: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Everything else is output by the JavaScript engine.

Page 58: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Everything else is output by the JavaScript engine.

그외 모든 것은

자바스크립트 엔진에 의해 만들어진

output 입니다 .

Page 59: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The method is used to print data.

Page 60: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The method is used to print data.

그 메서드가 사용됩니다 ,

데이터를 출력하기 위해 ..

Page 61: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

sometimes : 가끔

The method console.log() is sometimes used to print data.

Page 62: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

sometimes : 가끔

The method console.log() is sometimes used to print data.

데이터를 출력하기 위해

가끔

console.log() 메서드가 사용됩니다 .

Page 63: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The method console.log() is sometimes used to print data to the console

Page 64: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

The method console.log() is sometimes used to print data to the console

console.log() 메서드가 가끔 사용됩니다

콘솔에 데이터를 출력시키는데 ..

Page 65: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

It works.

그것은 작동합니다 .

(this method works in most JavaScript environments, including Node.js).

Page 66: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

It works.

그것은 작동합니다 .

(this method works in most JavaScript environments, including Node.js).

( 이 메서드는 작동합니다 ,

대부분의 자바스크립트 환경에서 ,

Node.js 를 포함해서 말이죠 .)

Page 67: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

find : 찾다

finding : 찾는 것

Finding documentation

문서를 찾는 것

Page 68: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

in action : 작동을 하는

Sometimes, you see functions and methods in action,

Page 69: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

in action : 작동을 하는

Sometimes, you see functions and methods in action,

때때로 ,

여러분은 함수와 메서드가

작동하는 것을 볼 것입니다 .

Page 70: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

, which should make it clear how they work.

Page 71: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

, which should make it clear how they work.

그것은

그들이 어떻게 작동하는지 명확할 것입니다 .

Page 72: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

in action : 작동하는

make it clear : 명확히 하다 .

Sometimes, you see functions and methods in action, which should make it clear how they work.

Page 73: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

in action : 작동하는

make it clear : 명확히 하다 .

Sometimes, you see functions and methods in action, which should make it clear how they work.

때때로 , 여러분은 함수와 메서드가 작동하는 것을 볼 텐데요 ,

그들이 어떻게 작동하는지는 명확할 겁니다 .

Page 74: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

look up : 정보 등을 검색해서 찾아보다 .

There are links to pages, where you can look up the details.

Page 75: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

look up : 정보 등을 검색해서 찾아보다 .

There are links to pages, where you can look up the details.

페이지로 가는 링크가 있습니다 ,

그곳에서 여러분은 세부사항을 찾아볼 수 있고요 .

Page 76: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

If not, there are links to pages of the Mozilla Developer Network, where you can look up the details.

Page 77: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

If not, there are links to pages of the Mozilla Developer Network, where you can look up the details.

그렇지 않다면 ( 명확하지 않다면 ),

모질라 개발자 네트워크 페이지로 가는 링크가 있습니다 ,

그곳에서 여러분은 상세한 내용을 찾을 수 있어요 .

Page 78: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Additionally, you can use Google to find documentation on MDN.

Page 79: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Additionally, you can use Google to find documentation on MDN.

그리고 ,

여러분은 구글을 사용할 수 있습니다 ,

MDN 상의 문서를 검색하기 위해서 말이죠 .

Page 80: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

following : 아래 나오는

For example, the following Google search finds the documentation for the push() method of arrays: mdn array push

Page 81: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

following : 아래 나오는

For example, the following Google search finds the documentation for the push() method of arrays: mdn array push

예를 들어 ,

아래의 구글검색어는

문서를 검색합니다 ,

배열의 push() 메서드가 나온 문서를요 .

mdn array push

Page 82: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

nature : 속성 , 본질

The nature of the language

이 언어의 속성

Page 83: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

background on:

~ 에 대한 배경지식

This section gives a little background on the nature of JavaScript,

이 섹션은

약간의 배경지식을 제공합니다 .

자바스크립트의 속성에 대한 배경지식을요 ,

Page 84: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

, to help you understand why it is the way it is.

Page 85: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

, to help you understand why it is the way it is.

그것이 왜 그렇게 생겨먹었는지

여러분이 이해하는 것을 돕기 위해 ..

Page 86: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

This section gives a little back-ground on the nature of JavaScript, to help you understand why it is the way it is.

Page 87: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

This section gives a little back-ground on the nature of JavaScript, to help you understand why it is the way it is.

이 섹션에서는 ,

자바스크립트가 왜 그렇게 생겨먹었는지 여러분이 이해하는 것을 돕기 위해 ,

자바스크립트의 속성에 대한 약간의 배경지식을 제공합니다 .

Page 88: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

JavaScript versus ECMAScript

자바스크립트 Vs. ECMA 스크립트

Page 89: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

(A) is called (B).

(B)(A) 는 (B) 라고 불린다 .

The programming language is called JavaScript, the language standard is called EC-MAScript.

Page 90: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

(A) is called (B).

(B)(A) 는 (B) 라고 불린다 .

The programming language is called JavaScript, the language standard is called EC-MAScript.

프로그래밍 언어는 자바스크립트라고 불리고 ,

언어 표준은 ECMA 스크립트라고 불립니다 .

Page 91: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

They have different names, because there is a trademark on “Java” (held by Oracle).

Page 92: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

They have different names, because there is a trademark on “Java” (held by Oracle).

그들은 서로 다른 이름을 갖고 있습니다 ,

왜냐하면 “ Java” 가 등록된 상표이기 때문이죠 .

( 오라클이 들고 있는 ).

Page 93: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Only Mozilla is allowed to use the name “JavaScript”.

Page 94: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Only Mozilla is allowed to use the name “JavaScript”.

모질라만 “자바스크립트”라는

이름을 사용해도 됩니다 .

Page 95: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

at the moment : 현재는

officially : 공식적으로

received : 받았다

long ago : 오래 전에

At the moment, only Mozilla is allowed to officially use the name “JavaScript”, because they received a license long ago.

Page 96: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

at the moment : 현재는

officially : 공식적으로

received : 받았다

long ago : 오래 전에

At the moment, only Mozilla is allowed to officially use the name “JavaScript”, because they received a license long ago. 현재는 ,

모질라만이 “자바스크립트”라는 이름을 공식적으로 사용할 수 있습니다 ,

왜냐하면 오래전에 라이센스를 받았기 때문이죠 .

Page 97: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

therefore : 따라서

had to have (A) :

(A) 를 가져야 했다 .

Therefore, an open language standard had to have a different name.

Page 98: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

therefore : 따라서

had to have (A) :

(A) 를 가져야 했다 .

Therefore, an open language standard had to have a different name.

따라서 ,

공개된 언어 표준은

다른 이름을 가져야 했습니다 .

Page 99: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

current version:

현재 버전

currently : 현재

The current version of JavaScript is ECMAScript 5, ECMAScript 6 is currently being de-veloped.

Page 100: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

current version:

현재 버전

currently : 현재

The current version of JavaScript is ECMAScript 5, ECMAScript 6 is currently being de-veloped.

자바스크립트의 현재버전은 ECMA

스크립트 5 이며 ,

ECMA 스크립트 6 은 현재 개발되는 중입니다 .

Page 101: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Influences

( 자바스크립트가 받은 ) 영향들

Page 102: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

had no choice but to

create (A):

(A) 를 만드는 것 말고는 선택의 여지가 없었다

JavaScript’s creator had no choice but to create the lan-guage very quickly

Page 103: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

had no choice but to

create (A):

(A) 를 만드는 것 말고는 선택의 여지가 없었다

JavaScript’s creator had no choice but to create the lan-guage very quickly

자바스크립트를 만든 이는

그 언어를

매우 빨리 만드는 것 외에는

달리 선택의 여지가 없었습니다 .

Page 104: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

or : 그렇지 않았다면 ,

(A)would have been

used.

(A) 가 사용되었을 것입니다 .

worse : 더 안 좋은

(or other, worse, technologies would have been used).

Page 105: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

or : 그렇지 않았다면 ,

(A)would have been

used.

(A) 가 사용되었을 것입니다 .

worse : 더 안 좋은

(or other, worse, technologies would have been used).

그렇지 않았다면 , 다른 , 더 안 좋은 , 기술들이 사용되었을 것입니다 .

Page 106: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

or : 그렇지 않았다면 ,

(A)would have been

used :

(A) 가 사용되어왔을 것입니다 .

JavaScript’s creator, Brendan Eich, had no choice but to create the lan-guage very quickly (or other, worse, technologies would have been used at Netscape).

Page 107: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

or : 그렇지 않았다면 ,

(A)would have been

used :

(A) 가 사용되어왔을 것입니다 .

JavaScript’s creator, Brendan Eich, had no choice but to create the lan-guage very quickly (or other, worse, technologies would have been used at Netscape). 자바스크립트의 창시자인 , 브렌단 아이히는 그 언어를 빨리 만들어내는 것 외에는 선택의 여지가 없었습니다 . ( 그렇지 않았다면 ,

다른 , 더 안 좋은 , 기술들이 넷스케이프에서 사용되었을 것입니다 .)

Page 108: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

borrow : 빌리다 .

several : 몇몇

He borrowed from several pro-gramming languages:

Page 109: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

borrow : 빌리다 .

several : 몇몇

He borrowed from several pro-gramming languages:

그는 몇몇 프로그래밍 언어로부터 빌려왔습니다 .

Page 110: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

cause : 원인

Java is the cause of JavaScript’s syntax.

Page 111: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

cause : 원인

Java is the cause of JavaScript’s syntax.

자바는

자바스크립트 문법 (syntax) 의 원인입니다 .

( 자바스크립트의 문법은 자바에서 따왔습니다 . . 는 의미인듯요 )

Page 112: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to partition: 분할하다 .

나누다 .

Java is the cause of how JavaScript partitions values into primitives and objects.

Page 113: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to partition: 분할하다 .

나누다 .

Java is the cause of how JavaScript partitions values into primitives and objects.

자바는 자바스크립트가 값을 primitives 와 objects 로 나누는 방식의 원인입니다 .

( 자바스크립트가 값을 primitive 와 ob-

jects 로 나누는 방식은 자바에서 따왔습니다…는 의미로 이해했음요 )

Page 114: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Java is the cause of JavaScript’s syntax and of how it partitions val-ues into primitives and objects.

Page 115: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Java is the cause of JavaScript’s syntax and of how it partitions val-ues into primitives and objects.

자바는 자바스크립트의 문법과 ,

자바스크립트가 값을 primitives 와 objects 로 나누는 방식의 원인입니다 .

( 이 두 가지는 자바에서 따왔습니다 .)

Page 116: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

handling : 다루는 것

inspire : 영감을 주다 .

Scheme and AWK inspired JavaScript’s handling of functions.

Page 117: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

handling : 다루는 것

inspire : 영감을 주다 .

Scheme and AWK inspired JavaScript’s handling of functions.

Scheme 과 AWK 는

자바스크립트가 함수를 다루는 방식에

영감을 주었습니다 .

Page 118: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

first-class : 최고의 ,

일류의

frequencly : 빈번하게

Scheme and AWK inspired JavaScript’s handling of functions – they are first-class and used fre-quently in the language.

Page 119: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

first-class : 최고의 ,

일류의

frequencly : 빈번하게

Scheme and AWK inspired JavaScript’s handling of functions – they are first-class and used fre-quently in the language.

Scheme 과 AWK 는 자바스크립트가 함수를 다루는 방식에 영감을 주었습니다 – 이 두개 언어는 최고 수준이며 , 자바스크립트 언어에서 빈번하게 사용됩니다 .

Page 120: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Closures make them a powerful tool.

Page 121: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Closures make them a powerful tool.

Clousres 는 그들을 강력한 도구로 만들어줍니다 .

(Closure 덕분에 그들은 매우 강력한 도구가 됩니다 .)

Page 122: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

(A) is responsible for

(B) :

(A) 는 (B) 의 원인이 다 .

unique : 독특한

Self is responsible for JavaScript’s unique style of object-oriented pro-gramming (OOP).

Page 123: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

(A) is responsible for

(B) :

(A) 는 (B) 의 원인이 다 .

unique : 독특한

Self is responsible for JavaScript’s unique style of object-oriented pro-gramming (OOP).

Self 는 자바스크립트의 고유한 OOP 스타일의 원인이 됩니다 .

(Self 가 있기에 , 자바스크립트는 고유한 OOP 스타일을 갖습니다 .)

Page 124: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

elegant : 명쾌한

Its core is elegant, some of the things built on top of that core are less so.

Page 125: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

elegant : 명쾌한

Its core is elegant, some of the things built on top of that core are less so.

자바스크립트의 코어는 명쾌하며 ,

그 코어의 위에 만들어진 것들 중 몇몇은 덜 명쾌합니다 .

Page 126: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

go into : 들어가다

Its core (which we can’t go into here) is elegant, some of the things built on top of that core are less so.

Page 127: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

go into : 들어가다

Its core (which we can’t go into here) is elegant, some of the things built on top of that core are less so.

자바스크립트의 코어 ( 여기서는 다룰 수 없지만 ) 는 명쾌합니다 , 그 코어 위에 만들어진 것들 중 몇몇은 덜 명쾌합니다 .

Page 128: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

killer feature : 인상적인 기능

direcly : 바로 , 즉시

A killer feature is that you can create objects, di-rectly.

Page 129: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

killer feature : 인상적인 기능

direcly : 바로 , 즉시

A killer feature is that you can create objects, di-rectly.

인상적인 기능 하나는

오브젝트를 바로 생성할 수 있다는 것입니다 .

Page 130: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

A killer feature of JavaScript OOP is that you can create objects, di-rectly.

Page 131: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

A killer feature of JavaScript OOP is that you can create objects, di-rectly.

자바스크립트 OOP 의

인상적인 기능 하나는 ,

오브젝트를 바로 생성할 수 있다는 것입니다 .

Page 132: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

There is no need to

create (A) :

(A) 를 만들 필요가 없습니다 .

first : 먼저

There is no need to create a class first.

Page 133: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

There is no need to

create (A) :

(A) 를 만들 필요가 없습니다 .

first : 먼저

There is no need to create a class first.

먼저 클래스를 만들 필요가 없습니다 .

( 오브젝트를 만들기 전에 )

Page 134: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

something similar : 그 비슷한 뭔가

There is no need to create a class or something similar first.

Page 135: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

something similar : 그 비슷한 뭔가

There is no need to create a class or something similar first.

클래스나 그 비슷한 뭔가를

먼저 만들 필요가 없습니다 .

( 오브젝트를 만들기 전에 )

Page 136: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

influenced : 영향을 주었다 .

Perl and Python influenced JavaScript’s handling of strings

Page 137: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

influenced : 영향을 주었다 .

Perl and Python influenced JavaScript’s handling of strings

펄과 파이썬은

자바스크립트가 문자열을 다루는 방식에

영향을 주었습니다 .

Page 138: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Perl and Python influenced JavaScript’s handling of strings, ar-rays and regular expressions.

Page 139: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Perl and Python influenced JavaScript’s handling of strings, ar-rays and regular expressions.

펄과 파이선은

자바스크립트가

문자열 , 배열 , 정규표현식을

다루는데 영향을 주었습니다 .

Page 140: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

until (A) : (A) 전까지는 ..

JavaScript did not have exception handling until ECMAScript 3

Page 141: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

until (A) : (A) 전까지는 ..

JavaScript did not have exception handling until ECMAScript 3

자바스크립트는

ECMA 스크립트 3 이전까지는

예외 처리기능이 없었습니다 .

Page 142: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

automatically : 자동으로

fail : 작동이 안되다 .

고장나다 .

,which explaines why the language fails silently

Page 143: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

automatically : 자동으로

fail : 작동이 안되다 .

고장나다 .

,which explaines why the language fails silently

, 그리고 그것은 자바스크립트가 왜 조용히 고장나는지 설명해줍니다 .

Page 144: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

explain : 설명해주다

convert values : 값을 변환하다 .

fail : 작동이 안되다 .

, which explains why the language so often automatically converts values and so often fails silently:

Page 145: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

explain : 설명해주다

convert values : 값을 변환하다 .

fail : 작동이 안되다 .

, which explains why the language so often automatically converts values and so often fails silently:

, 이것은 왜 자바스크립트가

그렇게 자주 자동으로 값을 변환하고선 , 그렇게 자주 조용히 작동에 실패하는지 설명해 줍니다 .

Page 146: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

initially : 처음에

it initially couldn’t throw excep-tions.

Page 147: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

initially : 처음에

it initially couldn’t throw excep-tions.

자바스크립트는 처음에는 예외처리를 할 수 없었던 겁니다 .

Page 148: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

JavaScript did not have exception han-dling until ECMAScript 3, which explains why the language so often automati-cally converts values and so often fails silently: it initially couldn’t throw ex-ceptions.

Page 149: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

JavaScript did not have exception han-dling until ECMAScript 3, which explains why the language so often automati-cally converts values and so often fails silently: it initially couldn’t throw ex-ceptions.자바스크립트는 ECMA 스크립트 3

이전까지는 예외처리기능이 없었습니다 , 이는 왜 이 언어가 자동으로 값을 변환하고선 그렇게 자주 조용히 작동에 실패하는지 설명해주죠 :

처음에는 예외처리를 해줄 수 없었던 거죠 .

Page 150: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

on one hand : 한편으로는

quirk : 별난 점

is missing (A) : (A) 가 없다 .

quite a bit : 상당히 많은

functionality : 기능

On one hand, JavaScript has quirks and is missing quite a bit of functionality

Page 151: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

on one hand : 한편으로는

quirk : 별난 점

is missing (A) : (A) 가 없다 .

quite a bit : 상당히 많은

functionality : 기능

On one hand, JavaScript has quirks and is missing quite a bit of functionality

한편으로 ,

자바스크립트는 별난 점들이 있고요 ,

꽤 많은 기능이 없습니다 .

Page 152: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

On one hand, JavaScript has quirks and is missing quite a bit of func-tionality(block-scoped variables, modules, support for subtyping, etc.).

Page 153: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

On one hand, JavaScript has quirks and is missing quite a bit of func-tionality(block-scoped variables, modules, support for subtyping, etc.).한편으로는 , 자바스크립트는 별난 점들이 있고 , 꽤 많은 기능이 없습니다 . (block-scoped 변수 ,

모듈 , subtyping 지원 등등 )

Page 154: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

on the other hand :

다른 한편으로는

On the other hand, it has several powerful features.

Page 155: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

on the other hand :

다른 한편으로는

On the other hand, it has several powerful features.

다른 한편으로는 ,

자바스크립트는 몇 가지 강력한 기능들이 있습니다 .

Page 156: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to work around a prob-

lem : 문제를 성공적으로 다루다 .

It has powerful features that allow you to work around these problems.

Page 157: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

to work around a prob-

lem : 문제를 성공적으로 다루다 .

It has powerful features that allow you to work around these problems.

자바스크립트는

여러분이 이런 문제들을 해결하도록 해주는

강력한 기능들이 있습니다 ..

Page 158: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

On the other hand, it has several powerful features that allow you to work around these problems.

Page 159: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

On the other hand, it has several powerful features that allow you to work around these problems.

다른 한편으로는 , 자바스크립트는

여러분이 이런 문제들을 성공적으로 해결하도록 해주는 강력한 기능들이 몇 가지 있습니다 .

Page 160: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

In other languages, you learn lan-guage features.

Page 161: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

In other languages, you learn lan-guage features.

다른 언어의 경우에 , 여러분은 언어의 특징을 배웁니다 .

Page 162: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

instead : 대신에

In JavaScript, you often learn patterns, instead.

Page 163: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

instead : 대신에

In JavaScript, you often learn patterns, instead.

자바스크립트의 경우 ,

( 언어 특징 ) 대신에

보통 패턴을 배웁니다 .

Page 164: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

appealing : 매력적인

brief history : 간략한 역사

Further readingJavaScript: how it all beganJavaScript: the glass is half full [what makes JavaScript appeal-ing?]ECMAScript: ES.next versus ES 6 versus ES Harmony [includes a brief history of ECMAScript versions]Perl and Python influences in JavaScript

Page 165: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

appealing : 매력적인

brief history : 간략한 역사

Further readingJavaScript: how it all beganJavaScript: the glass is half full [what makes JavaScript appeal-ing?]ECMAScript: ES.next versus ES 6 versus ES Harmony [includes a brief history of ECMAScript versions]Perl and Python influences in JavaScript

더 읽을 거리

자바스크립트 : 이모든 것 어케 시작되었나 .

자바스크립트 : 컵은 절반이나 차 있다 . [ 자바스크립트 , 왜 매력있나 ?]

ECMA 스크립트 : ES.next 대 ES 6 대 ES Harmony

[ECMA 스크립트 버전의 간략한 역사 ]

자바스크립트에 미친 펄과 파이썬의 영향

Page 166: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Syntax

( 자바스크립트의 ) 문법

Page 167: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

explain : 설명하다

This section explains a few basic syntactic principles of JavaScript.

Page 168: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

explain : 설명하다

This section explains a few basic syntactic principles of JavaScript.

이 섹션은

자바스크립트의

기본적인 문법 원칙 몇 개를 설명합니다 .

Page 169: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Statements versus expressions

Statement Vs. expression

Page 170: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

it helps to know : ~ 을 아는 것이 도움이 된다 .

To understand JavaScript’s syntax, it helps to know that it has two cat-egories.

Page 171: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

it helps to know : ~ 을 아는 것이 도움이 된다 .

To understand JavaScript’s syntax, it helps to know that it has two cat-egories.

자바스크립트의 문법을 이해하기 위해서는 ,

자바스크립트가 두개의 카테고리를 갖는다는 점을 아는 것이 도움이 됩니다 .

Page 172: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

simplifyingly :

단순화해서

major categories : 큰 카테고리

To understand JavaScript’s syntax, it helps to know that (simplifyingly), it has two major syntactic categories: statements and expressions.

Page 173: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

simplifyingly :

단순화해서

major categories : 큰 카테고리

To understand JavaScript’s syntax, it helps to know that (simplifyingly), it has two major syntactic categories: statements and expressions.자바스크립트의 문법을 이해하기 위해서는 , (단순화해서 ) 자바스크립트가 두개의 큰 통사적 범주를 갖고 있다는 점을 알면 도움이 됩니다 : 바로 statement

와 expression 입니다 .

Page 174: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Statements “do things”.

Page 175: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Statements “do things”.

Statements 는 “뭔가를 합니다” .

Page 176: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

sequence : 연속적인 사건들

A program is a sequence of state-ments.

Page 177: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

sequence : 연속적인 사건들

A program is a sequence of state-ments.

프로그램은

statement 들의 연속입니다 .

Page 178: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

declare : 선언하다

variable foo: 변수 foo

Example of a statement, which de-clares (creates) a variable foo: var foo;

Page 179: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

declare : 선언하다

variable foo: 변수 foo

Example of a statement, which de-clares (creates) a variable foo: var foo;

statement 의 예 , 변수 foo 를 선언하는 statement:

var foo;

Page 180: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Expressions produce values.

Page 181: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Expressions produce values.

expressions 는 값을 만들어냅니다 .

Page 182: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

right-hand side : 우측

They are the right-hand side of an assignment.

Page 183: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

right-hand side : 우측

They are the right-hand side of an assignment.

Expression 은 할당했을 때 ,

우측에오는 것입니다 .

Page 184: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

right-hand side : 우측

They are the right-hand side of an assignment, function arguments, etc.

Page 185: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

right-hand side : 우측

They are the right-hand side of an assignment, function arguments, etc.

Expression 은 할당했을 때 ,

함수의 인자 등등의 우측에오는 것입니다 .

Page 186: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Example of an expression: 3 * 7

expression 의 예 :

3 * 7

Page 187: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

distinction : 구분

The distinction between statements and expressions

Page 188: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

distinction : 구분

The distinction between statements and expressions

statements 와 expression 간의 구분

Page 189: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

is best illustrated by

(A) : (A) 에 의해 가장 잘 묘사된다 .

The distinction is best illustrated by the fact.

Page 190: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

is best illustrated by

(A) : (A) 에 의해 가장 잘 묘사된다 .

The distinction is best illustrated by the fact.

이 구분은

그 사실에 의해 가장 잘 묘사됩니다 .

Page 191: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

fact : 사실

two different ways: 두 가지 방식

the fact that JavaScript has two different ways to do if-then-else

Page 192: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

fact : 사실

two different ways: 두 가지 방식

the fact that JavaScript has two different ways to do if-then-else

자바스크립트가

if-then-else 를 수행하는

두 가지 방식을 가진다는 사실

Page 193: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

like Java : 자바와 마찬가지로

The distinction between statements and expressions is best illustrated by the fact that JavaScript (like Java) has two different ways to do if-then-else.

Page 194: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

like Java : 자바와 마찬가지로

The distinction between statements and expressions is best illustrated by the fact that JavaScript (like Java) has two different ways to do if-then-else.

statement 와 expression 간의 구분은 , 자바스크립트가 if-then-

else 를 수행하는 두 가지 방식을 가진다는 사실에 의해 가장 잘 묘사됩니다 .

Page 195: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Either (A) or (B) :

(A) 가 되었든 , (B) 가 되었든

Either as a statement: var x; if (y >= 0) { x = y; } else { x = -y; }

Or as an expression: var x = y >= 0 ? y : -y;

Page 196: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Either (A) or (B) :

(A) 가 되었든 , (B) 가 되었든

Either as a statement: var x; if (y >= 0) { x = y; } else { x = -y; }

statement 로 썼을 때든 :

아니면 expression 로 썼을 때든 :

Or as an expression: var x = y >= 0 ? y : -y;

Page 197: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

the latter : 후자

the former : 전자

You can use the latter as a function argument (but not the former): myFunction(y >= 0 ? y : -y)

Page 198: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

the latter : 후자

the former : 전자

You can use the latter as a function argument (but not the former): myFunction(y >= 0 ? y : -y)

후자는 함수의 인자로 사용할 수 있지만

( 전자는 함수의 인자로 사용할 수 없습니다 ):

Page 199: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

lastly : 마지막으로

wherever : 어디에서나

expect : 기대하다

Lastly, wherever JavaScript expects a statement, you can also use an ex-pression.

Page 200: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

lastly : 마지막으로

wherever : 어디에서나

expect : 기대하다

Lastly, wherever JavaScript expects a statement, you can also use an ex-pression.

마지막으로 ,

자바스크립트가 statement 를 기대하는 곳이면 어디에서나 ,

expression 도 사용할 수 있습니다 .

Page 201: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

so-called : 소위

For example: foo(bar(7, 1));foo(...); is a statement (a so-called expression statement), bar(7, 1) is an expression.

Page 202: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

so-called : 소위

For example: foo(bar(7, 1));foo(...); is a statement (a so-called expression statement), bar(7, 1) is an expression.

예를 들어 :

foo (bar (7, 1));

foo (…); 는 statement 입니다 .

( 소위 expression statement 이죠 ),

그리고 bar (7,1) 는 expression 입니다 .

Page 203: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Both are function calls.

Page 204: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Both are function calls.

둘 다 함수를 호출한 것이고요 .

Page 205: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Control flow statements and blocks

Control flow statement 와 block

Page 206: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

For control flow statements, the body can be a single statement.

Page 207: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

For control flow statements, the body can be a single statement.

control flow statement 의 경우 ,

body 부분은 statement 한 개로 이루어져도 됩니다 .

Page 208: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Two examples: if (obj !== null) obj.foo();

while (x > 0) x--;

Page 209: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Two examples: if (obj !== null) obj.foo();

while (x > 0) x--;

두 가지 예 :

if (obj !== null) obj.foo();

while (x > 0) x--;

Page 210: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

be replaced : 대체되다 .

However, any statement can always be replaced by a block.

Page 211: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

be replaced : 대체되다 .

However, any statement can always be replaced by a block.

하지만 ,

모든 statement 는

항상 block 으로 대체될 수 있습니다 .

Page 212: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

a block, curly braces containing zero or more statements

Page 213: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

a block, curly braces containing zero or more statements

블록 , 0 개 이상의 statement 를 포함하는 { }

Page 214: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

However, any statement can always be replaced by a block, curly braces containing zero or more statements.

Page 215: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

However, any statement can always be replaced by a block, curly braces containing zero or more statements.

하지만 ,

statement 는 항상 블록으로 대체될 수 있습니다 , 블록은 0 개 이상의 statement 를 포함하는 { }

이고요 .

Page 216: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

thus : 따라서

You could write : 이렇게 쓸 수 있겠죠 .

Thus, you could also write: if (obj !== null) { obj.foo(); } while (x > 0) { x--; }

Page 217: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

thus : 따라서

You could write : 이렇게 쓸 수 있겠죠 .

Thus, you could also write: if (obj !== null) { obj.foo(); } while (x > 0) { x--; }

따라서 , 이렇게 쓸 수도 있겠죠 :

if (obj !== null) {

obj.foo();

}

while (x > 0) {

x--;

}

Page 218: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

the latter form : 후자의 형태

In this blog post, we only use the latter form of control flow state-ments.

Page 219: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

the latter form : 후자의 형태

In this blog post, we only use the latter form of control flow state-ments.

이 블로그 포스트에서는 ,

control flow statement 의 형태중 ,

후자만을 사용합니다 .

Page 220: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Semicolons

세미콜론 ( 사용에 대하여 )

Page 221: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

optional : 선택사항인

Semicolons are optional in JavaScript.

Page 222: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

optional : 선택사항인

Semicolons are optional in JavaScript.

자바스크립트에서 세미콜론은

선택사항입니다 .

Page 223: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

omitting (A) : (A) 를 생략하는 것

lead to (A) : (A) 로 이어지다 .

recommand against do-

ing it : 그것 하는 것을 하지 말라고 권하다 .

But omitting them can lead to sur-prises, which is why I recommend against doing it.

Page 224: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

omitting (A) : (A) 를 생략하는 것

lead to (A) : (A) 로 이어지다 .

recommand against do-

ing it : 그것 하는 것을 하지 말라고 권하다 .

But omitting them can lead to sur-prises, which is why I recommend against doing it.

하지만 세미콜론을 생략하는 것은 놀람으로 이어질 수 있습니다 ,

그것이 제가 생략하지 말라고 권하는 이유입니다 .

Page 225: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

As you can see above :

위에서 보듯이

terminate : 종료시키다 .

As you can see above, semicolons terminate statements, but not blocks.

Page 226: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

As you can see above :

위에서 보듯이

terminate : 종료시키다 .

As you can see above, semicolons terminate statements, but not blocks.

위에서 보듯이 ,

세미콜론은 statement 를 종료시키고 ,

block 을 종료시키지는 않습니다 .

(block 뒤에는 세미콜론을 안 씁니다 .)

Page 227: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

one case : 한 가지 경우

There is one case where you will see a semicolon after a block:

Page 228: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

one case : 한 가지 경우

There is one case where you will see a semicolon after a block:

block 뒤에 세미콜론을 보게 되는 것은

딱 한 가지 경우가 있습니다 :

Page 229: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

(A) ends with (B) : (A)

는 (B) 로 끝난다 . 즉 (A)

의 끝에는 (B) 가 나온다 .

A function expression is an expression that ends with a block.

Page 230: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

(A) ends with (B) : (A)

는 (B) 로 끝난다 . 즉 (A)

의 끝에는 (B) 가 나온다 .

A function expression is an expression that ends with a block.

function expression 이란

block 으로 끝나는 expression

입니다 .

Page 231: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

If such an expression comes last in a statement, it is followed by a semicolon:

var x = 3 * 7;

var f = function () { };

Page 232: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

If such an expression comes last in a statement, it is followed by a semicolon:

var x = 3 * 7;

var f = function () { };

statement 에서 그런 expres-

sion 이 마지막에 오면 ,

그 뒤에 세미콜론이 나옵니다 :

Page 233: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Comments

주석에 대하여

Page 234: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

two kinds of comments

: 두 종류의 주석

JavaScript has two kinds of com-ments: single-line comments and multi-line comments.

Page 235: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

two kinds of comments

: 두 종류의 주석

JavaScript has two kinds of com-ments: single-line comments and multi-line comments.

자바스크립트에는 두 가지 종류의 주석이 있습니다 :

한줄 주석과 여러 줄 주석

Page 236: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

start with (A) : (A) 로 시작하다

terminated : 종료당하다 .

Single-line comments start with // and are terminated by the end of the line: x++; // single-line comment

Page 237: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

start with (A) : (A) 로 시작하다

terminated : 종료당하다 .

Single-line comments start with // and are terminated by the end of the line: x++; // single-line comment

한줄 주석은 // 로 시작하고 ,

그 줄의 끝에서 끝납니다 .

Page 238: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

delimited : 범위가 정해지다 .

Multi-line comments are delimited by /* and */ /* This is

a multi-line comment. */

Page 239: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

delimited : 범위가 정해지다 .

Multi-line comments are delimited by /* and */ /* This is

a multi-line comment. */

여러 줄 주석은 /* 와 */ 로 범위가 정해집니다 .

Page 240: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Further readingExpressions versus statements in JavaScriptAutomatic semicolon insertion in JavaScript

Page 241: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Further readingExpressions versus statements in JavaScriptAutomatic semicolon insertion in JavaScript

더 읽을 거리자바스크립트에서 expression 과 statement

자바스크립트에서 자동 세미콜론 삽입

Page 242: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Variables and assignment

변수와 값 할당

Page 243: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

must be declared :

선언되어야 한다 .

Variables in JavaScript must be declared, before they can be used:

Page 244: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

must be declared :

선언되어야 한다 .

Variables in JavaScript must be declared, before they can be used:

자바스크립트에서

변수는 선언되어야 합니다 ,

사용될 수 있는 상태가 되기 전에

Page 245: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Assignment

값 할당

Page 246: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

at the same time :

동시에

You can declare a variable and as-sign a value at the same time: var foo = 6;

Page 247: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

at the same time :

동시에

You can declare a variable and as-sign a value at the same time: var foo = 6;

변수를 선언하고

동시에 값을 할당할 수 있습니다 .

Page 248: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

existing : 존재하는

You can also assign a value to an existing variable: foo = 4; // change variable `foo`

Page 249: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

existing : 존재하는

You can also assign a value to an existing variable: foo = 4; // change variable `foo`

이미 존재하는 변수에다가

값을 할당할 수도 있습니다 :

foo = 4; // ‘foo’변수를 바꾼다 .

Page 250: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Compount assignment operators

복합 할당 연산자

Page 251: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

operations such as (A)

: (A) 와 같은 연산자 .

There are compound assignment operators such as +=.

Page 252: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

operations such as (A)

: (A) 와 같은 연산자 .

There are compound assignment operators such as +=.

+= 와 같은

복합 할당 연산자가 있습니다 .

Page 253: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

following : 뒤에 나오는

equivalent : 동일한 것

The following two assignments are equivalent: x += 1; x = x + 1;

Page 254: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

following : 뒤에 나오는

equivalent : 동일한 것

The following two assignments are equivalent: x += 1; x = x + 1;

다음에 나오는 두 가지 할당은

서로 동일합니다 .

Page 255: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Identifiers and variable names

identifier 와 변수명

Page 256: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Identifiers are names for things, they play various syntactic roles in JavaScript.

Page 257: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Identifiers are names for things, they play various syntactic roles in JavaScript.

identifier 는 이름을 말합니다 ,

이들은 자바스크립트에서

다양한 문법적 역할을 합니다 .

Page 258: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

For example, the name of a variable is an identifier.

Page 259: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

For example, the name of a variable is an identifier.

예를 들어 , 변수의 이름은 일종의 identifier 입니다 .

Page 260: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Roughly, the first character of an identifier can be any Unicode letter, a dollar sign ($) or an underscore (_).

Page 261: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Roughly, the first character of an identifier can be any Unicode letter, a dollar sign ($) or an underscore (_).

대략 , identifier 의 첫번째 문자는 Unicode 문자나 , $ 기호나 ,

언더바 모두 될 수 있습니다 .

Page 262: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Later characters can additionally be any Unicode digit.

Page 263: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Later characters can additionally be any Unicode digit.

그 뒤에 나오는 문자는 Unicode

digit 이면 뭐든 될 수 있습니다 .

Page 264: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Thus, the following are all legal identifiers: arg0

_tmp $elem π

Page 265: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Thus, the following are all legal identifiers: arg0

_tmp $elem π

따라서 , 다음에 나오는 것은

모두 문법에 맞는 identifier 입니다 :

arg0

_tmp

$elem

π

Page 266: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

reserved : 예약된

Several identifiers are “reserved words” – they are part of the syntax and can’t be used as variable names:

Page 267: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

reserved : 예약된

Several identifiers are “reserved words” – they are part of the syntax and can’t be used as variable names:

몇몇 identifier 는 “미리 예약된 단어”이다 –이들은 문법의 일부를 이루며 , 변수명으로 사용될 수 없습니다 .

Page 268: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

reserved words

arguments break case catch class const continue debugger default delete do else enum eval export extends false finally for function if im-plements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield

예약된 이름들

arguments break case catch class const continue

debugger default delete do else enum eval export

extends false finally for function if implements im-

port in instanceof interface let new null package

private protected public return static super switch

this throw true try typeof var void while with yield

Page 269: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

technically : 엄밀히 따지자면

Technically, the following three identifiers are not reserved words, but shouldn’t be used as variable names, either: Infinity NaN undefined

Page 270: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

technically : 엄밀히 따지자면

Technically, the following three identifiers are not reserved words, but shouldn’t be used as variable names, either: Infinity NaN undefined다음에 나오는 세 가지 identifier 는 ,

엄밀히 따지면 , 예약된 이름은 아니지만 ,

변수명으로 사용되어서는 안됩니다 .

Infinity NaN undefined

Page 271: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

Further reading

Valid JavaScript variable names [by Mathias Bynens]

더 읽을 거리

사용할 수 있는 자바스크립트 변수명 [by Mathias Bynens]

Page 272: 인내심없는 개발자를 위한 자바스크립트 - 한줄씩 영어공부하기

감사합니다

끝까지는 못했어요 . 졸리기도 하고 , 슬라이드도 너무 많고 해서 .. 일단 여기까지 해서 중도 포기 !