A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/ko/docs/Web/JavaScript/Reference/Operators/Remainder_assignment below:

나머지 í• ë‹¹ (%=) - JavaScript

나머지 할당 (%=)

Baseline Widely available

나머지 할당 연산자(%=)는 오른쪽 피연산자의 값으로 변수를 나눴을 때의 나머지를 다시 변수에 할당합니다.

시도해 보기
let a = 3;

console.log((a %= 2));
// Expected output: 1

console.log((a %= 0));
// Expected output: NaN

console.log((a %= "hello"));
// Expected output: NaN
구문 예제 나머지 할당 사용하기
// bar = 5
// 위와 같은 변수를 가정할 때

bar %= 2; // 1
bar %= "foo"; // NaN
bar %= 0; // NaN
명세 브라우저 호환성 같이 보기

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4