blob: 2b741ecff9dcb3c5a25cfb55d98b8ddf37625bd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
---
title: 거듭제곱 할당 (**=)
slug: Web/JavaScript/Reference/Operators/Exponentiation_assignment
tags:
- Assignment operator
- JavaScript
- Language feature
- Operator
- Reference
browser-compat: javascript.operators.exponentiation_assignment
translation_of: Web/JavaScript/Reference/Operators/Exponentiation_assignment
---
<div>{{jsSidebar("Operators")}}</div>
<p>
거듭제곱 할당 연산자(<code>**=</code>)는 오른쪽 피연산자의 값으로 변수를 거듭제곱한 결과를 다시 변수에 할당합니다.
</p>
<div>{{EmbedInteractiveExample("pages/js/expressions-exponentiation-assignment.html")}}</div>
<h2 id="syntax">구문</h2>
<pre class="brush: js">x **= y // x = x ** y</pre>
<h2 id="examples">예제</h2>
<h3 id="using_exponentiation_assignment">거듭제곱 할당 사용하기</h3>
<pre class="brush: js">
// bar = 5
// 위와 같은 변수를 가정할 때
bar **= 2 // 25
bar **= 'foo' // NaN
</pre>
<h2 id="specifications">명세</h2>
{{Specifications}}
<h2 id="browser_compatibility">브라우저 호환성</h2>
<p>{{Compat}}</p>
<h2 id="see_also">같이 보기</h2>
<ul>
<li>
<a href="/ko/docs/Web/JavaScript/Guide/Expressions_and_Operators#assignment">JavaScript 안내서의 할당 연산자</a>
</li>
<li><a href="/ko/docs/Web/JavaScript/Reference/Operators/Exponentiation">거듭제곱 연산자</a></li>
</ul>
|