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
a || b | |
in short, this is democracy, if one of them is a Yes man, we all yes man. | |
Read more | |
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR | |
a || b || c | |
How does this work to? | |
Thanks ChatGPT-san, |
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
const adventurer = { | |
name: 'Alice', | |
cat: { | |
name: 'Dinah' | |
} | |
}; | |
const dogName = adventurer.dog?.name; | |
console.log(dogName); | |
// Expected output: undefined |
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
/** | |
* Asnwer: | |
* @import new-style.css wrapped inside <style scope> won't make the CSS code imported become scoped | |
**/ | |
# Correct Scoped | |
<style scoped> | |
header { | |
width: 100%; | |
height: 5rem; |