축 평가를 거치면 그 효과는 일어나지 않기 때문입니다. 부수 효과는 보통 부정적인 의미로 쓰
이지만 항상 그런 건 아닙니다. 결과가 의도적이고 명확하다면 나쁘게 평가할 이유는 없습니다.
표현식에서 부수 효과는 증가, 감소, 할당, 함수 호출에서 일어날 수 있습니다. 증가와 감소 연
산자는 이미 살펴봤으니 이들에 관한 예제를 봅시다.
const
skipIt
=
true
;
let
x
=
0
;
const
result
=
skipIt
||
x
++;
예제의 세 번째 행의 결과는
result
에 저장됩니다. 첫 번째 피연산자가
skipIt
이
true
이므로
result
도
true
입니다. 우리가 주목할 점은, 세 번째 ...
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.