Skip to content

Instantly share code, notes, and snippets.

@showlovezz
Last active February 9, 2020 15:32
Show Gist options
  • Save showlovezz/08d3bca492980578be88a6e7c6b6281c to your computer and use it in GitHub Desktop.
Save showlovezz/08d3bca492980578be88a6e7c6b6281c to your computer and use it in GitHub Desktop.
鼠年全馬鐵人挑戰 - 1-5
var x = 1;
{
var x = 2;
console.log(x)
}
console.log(x)
// console 會印出 2 跟 2
let x = 1;
{
let x = 2;
console.log(x)
}
console.log(x)
// console 會印出 2 跟 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment