Last active
March 12, 2020 00:54
-
-
Save showlovezz/2584da066460bbe87803afdba7f3de08 to your computer and use it in GitHub Desktop.
鼠年全馬鐵人挑戰 - 6-2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 以下左右兩邊的意思是相同的 | |
x++ <==> x = x + 1; | |
x-- <==> x = x - 1; | |
// Example 1 | |
var x = 10; | |
var y = x++; | |
console.log(x) // 會得到 11 | |
console.log(y) // 會得到 10 | |
// Example 2 | |
var x = 10; | |
var y = ++x; | |
console.log(x) // 會得到 11 | |
console.log(y) // 會得到 11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment