Skip to content

Instantly share code, notes, and snippets.

@showlovezz
Created March 13, 2020 01:07
Show Gist options
  • Save showlovezz/88a9e331e89f47e2d235c293e1f46bcb to your computer and use it in GitHub Desktop.
Save showlovezz/88a9e331e89f47e2d235c293e1f46bcb to your computer and use it in GitHub Desktop.
鼠年全馬鐵人挑戰 - 6-5
// Sample 1
var x = 1;
var y = 2;
console.log(x === 1 && y === 1); // 會得到 false
console.log(x === 1 || y === 1); // 會得到 true
// Sample 2
var a = 'Taiwan'
var b = 'China'
console.log(a === 'Taiwan' && b === 'Taiwan'); // 會得到 false
console.log(a === 'Taiwan' || b === 'Taiwan'); // 會得到 true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment