Baseline Widely available
ê°ì(--
) ì°ì°ì ë í¼ì°ì°ì를 ê°ì(1ì ëº)ìí¤ê³ ì°ì°ìì ìì¹ì ë°ë¼ ê°ìí기 ì ì´ë íì ê°ì ë°íí©ëë¤.
let x = 3;
const y = x--;
console.log(`x:${x}, y:${y}`);
// Expected output: "x:2, y:3"
let a = 3;
const b = --a;
console.log(`a:${a}, b:${b}`);
// Expected output: "a:2, b:2"
구문 ì¤ëª
ë§ì½ í¼ì°ì°ì ë¤ì ì°ì°ì를 ë¶ì¬ì ì¬ì©íë¤ë©´ (ì를 ë¤ì´ x--
) ê°ì ì°ì°ìë ì를 ê°ììí¤ê³ ê°ìí기 ì ê°ì ë°íí©ëë¤.
ë§ì½ í¼ì°ì°ì ìì ì°ì°ì를 ë¶ì¬ì ì¬ì©íë¤ë©´(ì를 ë¤ì´ --x
) ê°ì ì°ì°ìë ì를 ê°ììí¤ê³ ê°ì í ê°ì ë°íí©ëë¤.
ê°ì ì°ì°ìë ì°¸ì¡°ì¸ í¼ì°ì°ì(ë³ì ë° ê°ì²´ ìì±, ë¤ì ë§í´ ì í¨í í ë¹ ëììë§ ì ì©í ì ììµëë¤. --x
ìì²´ë ì°¸ì¡°ê° ìë ê°ì¼ë¡ íê°ë기 ë문ì ì¬ë¬ ê°ì ì°ì°ì를 ì°ìì ì¼ë¡ ì¬ì©í ì ììµëë¤.
--(--x); // SyntaxError: Invalid left-hand side expression in prefix operation
ìì íì ê°ì
let x = 3;
const y = x--;
// x = 2
// y = 3
ì ì ê°ì
let x = 3;
const y = --x;
// x = 2
// y = 2
ëª
ì¸ ë¸ë¼ì°ì í¸íì± ê°ì´ 보기
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