diff options
| author | alattalatta <urty5656@gmail.com> | 2021-07-15 14:44:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-15 14:44:07 +0900 |
| commit | 187d4eb1e4784a944d28e22371ea08f39b538b27 (patch) | |
| tree | 3d1e5e6469b9c8a8222c6d83d637fec8560f4f39 /files/ko/web/javascript/reference/operators/remainder | |
| parent | de8eddb11dd3ef1861950e712d7811723b8b95b1 (diff) | |
| download | translated-content-187d4eb1e4784a944d28e22371ea08f39b538b27.tar.gz translated-content-187d4eb1e4784a944d28e22371ea08f39b538b27.tar.bz2 translated-content-187d4eb1e4784a944d28e22371ea08f39b538b27.zip | |
Add/update arithmetic operators (#1329)
* Update addition operator
* Add subtraction operator
* Add division operator
* Add multiplication operator
* Update remainder operator
* Add exponentiation operator
* Update operator names
* Update link to bitwise XOR operator
* Translate "Operator:" of syntax boxes
* Sync with English
Diffstat (limited to 'files/ko/web/javascript/reference/operators/remainder')
| -rw-r--r-- | files/ko/web/javascript/reference/operators/remainder/index.html | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/files/ko/web/javascript/reference/operators/remainder/index.html b/files/ko/web/javascript/reference/operators/remainder/index.html index beeb0033a3..e1a4b20312 100644 --- a/files/ko/web/javascript/reference/operators/remainder/index.html +++ b/files/ko/web/javascript/reference/operators/remainder/index.html @@ -1,73 +1,75 @@ --- -title: 나머지 연산자 (%) +title: 나머지 (%) slug: Web/JavaScript/Reference/Operators/Remainder +tags: +- JavaScript +- Language feature +- Operator +- Reference translation_of: Web/JavaScript/Reference/Operators/Remainder +browser-compat: javascript.operators.remainder --- <div>{{jsSidebar("Operators")}}</div> -<p>나머지 연산자(<code>%</code>)는 피제수가 제수에 의해 나누어진 후, 그 나머지를 반환합니다. 항상 피제수의 부호를 따릅니다.</p> +<p>나머지 연산자(<code>%</code>)는 왼쪽 피연산자를 오른쪽 피연산자로 나눴을 때의 나머지를 구합니다. 부호는 항상 왼쪽 피연산자의 부호를 따릅니다.</p> <div>{{EmbedInteractiveExample("pages/js/expressions-remainder.html")}}</div> -<div></div> +<h2 id="syntax">구문</h2> +<pre class="brush: js">x % y</pre> +<h2 id="examples">예제</h2> -<h2 id="문법">문법</h2> +<h3 id="remainder_with_positive_dividend">양의 피제수의 나머지</h3> -<pre class="syntaxbox notranslate"><strong>Operator:</strong> <var>var1</var> % <var>var2</var> +<pre class="brush: js"> + 12 % 5 // 2 + 1 % -2 // 1 + 1 % 2 // 1 + 2 % 3 // 2 +5.5 % 2 // 1.5 </pre> -<h2 id="예시">예시</h2> +<h3 id="remainder_with_negative_dividend">음의 피제수의 나머지</h3> -<h3 id="피제수의_나머지">(+)피제수의 나머지</h3> - -<pre class="brush: js notranslate"> 12 % 5 // 2 - 1 % -2 // 1 - 1 % 2 // 1 - 2 % 3 // 2 -5.5 % 2 // 1.5 -</pre> - -<h3 id="-피제수의_나머지">(-)피제수의 나머지</h3> - -<pre class="brush: js notranslate">-12 % 5 // -2 +<pre class="brush: js"> +-12 % 5 // -2 -1 % 2 // -1 --4 % 2 // -0</pre> +-4 % 2 // -0 +</pre> -<h3 id="NaN의_나머지">NaN의 나머지</h3> +<h3 id="remainder_with_nan">NaN의 나머지</h3> -<pre class="brush: js notranslate">NaN % 2 // NaN</pre> +<pre class="brush: js">NaN % 2 // NaN</pre> -<h2 id="Specifications">Specifications</h2> +<h3 id="Remainder_with_Infinity">Infinity의 나머지</h3> -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-multiplicative-operators', 'Remainder operator')}}</td> - </tr> - </tbody> -</table> +<pre class="brush: js"> +Infinity % 2 // NaN +Infinity % 0 // NaN +Infinity % Infinity // NaN +</pre> -<h2 id="Browser_compatibility">Browser compatibility</h2> +<h2 id="specifications">명세</h2> +{{Specifications}} +<h2 id="browser_compatibility">브라우저 호환성</h2> -<p>{{Compat("javascript.operators.remainder")}}</p> +<p>{{Compat}}</p> -<h2 id="See_also">See also</h2> +<h2 id="see_also">같이 보기</h2> <ul> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Addition">Addition operator</a></li> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Subtraction">Subtraction operator</a></li> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Division">Division operator</a></li> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Multiplication">Multiplication operator</a></li> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation">Exponentiation operator</a></li> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Increment">Increment operator</a></li> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Decrement">Decrement operator</a></li> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Unary_negation">Unary negation operator</a></li> - <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Unary_plus">Unary plus operator</a></li> + <li><a href="/ko/docs/Web/JavaScript/Reference/Operators/Addition">더하기 연산자</a></li> + <li><a href="/ko/docs/Web/JavaScript/Reference/Operators/Subtraction">빼기 연산자</a></li> + <li><a href="/ko/docs/Web/JavaScript/Reference/Operators/Division">나누기 연산자</a></li> + <li><a + href="/ko/docs/Web/JavaScript/Reference/Operators/Multiplication">곱하기 연산자</a></li> + <li><a href="/ko/docs/Web/JavaScript/Reference/Operators/Exponentiation">거듭제곱 연산자</a></li> + <li><a href="/ko/docs/Web/JavaScript/Reference/Operators/Increment">증가 연산자</a></li> + <li><a href="/ko/docs/Web/JavaScript/Reference/Operators/Decrement">감소 연산자</a></li> + <li><a href="/ko/docs/Web/JavaScript/Reference/Operators/Unary_negation">단항 부정 연산자</a></li> + <li><a href="/ko/docs/Web/JavaScript/Reference/Operators/Unary_plus">단항 플러스 연산자</a></li> </ul> |
