Last active
February 9, 2020 13:14
-
-
Save showlovezz/17d0509e49b3203c0689545e12bc0300 to your computer and use it in GitHub Desktop.
鼠年全馬鐵人挑戰 - 1-1
This file contains 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
var status = 'failed'; // 全域變數 | |
function getStatus() { | |
var status = 'ok'; // 區域變數 | |
return status | |
} | |
console.log(getStatus()) | |
console.log(status) | |
// 從第一行到第七行稱為全域範圍 | |
// 從第二行到第五行稱為區域範圍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment