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

자바스크립트 완벽 가이드

by David Flanagan, Han Seon- yong
February 2022
Beginner to intermediate
784 pages
24h 53m
Korean
Insight
Content preview from 자바스크립트 완벽 가이드
JavaScript
24
2장 어휘 구조
자바스크립트가 두 번째 행을 첫 번째 행의 연속이라고 분석할 수 없을 경우 줄바
꿈을 세미콜론으로 해석한다는 규칙에는 세 가지 예외가 있습니다. 첫 번째 예외는
return
,
throw
,
yield
,
break
,
continue
문과 관련이 있습니다(5장 참고). 이들은 종
종 독립적으로 사용되지만, 가끔 이 뒤에 식별자나 표현식이 올 때가 있습니다. 이
단어들 사이에(다른 토큰 앞에) 줄바꿈이 일어난다면, 자바스크립트는 항상 그 줄
바꿈을 세미콜론으로 해석합니다. 예를 들어 다음을 보십시오.
return
true;
자바스크립트는 다음과 같이 해석합니다.
return; true;
하지만 아마 의도는 다음과 같았을 것입니다.
return true;
따라서
return
,
break
,
continue
다음에 어떤 표현식을 쓴다면, 그 사이에 줄바꿈이
들어가서는 안 됩니다. 줄바꿈이 들어간다면 코드의 의도가 모호해지고 디버그하
기도 어렵습니다.
두 번째 예외는
++
와
--
연산자(4.8절)입니다. 이 연산자들은 전위 연산자로도,
후위 연산자로도 사용할 수 있습니다. 이들을 후위 연산자로 사용한다면 반드시 적
용할 표현식과 같은 행에 써야 합니다. 세 번째 예외는 화살표 함수입니다.
=>
는 반
드시 매개변수 리스트와 같은 행에 있어야 합니다. ...
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