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
.container { | |
width: 500px; | |
background: #0099ff; | |
margin: 0 auto; | |
} | |
.container .item { | |
background: #00ffa2; | |
color: #d32a2a; | |
text-align: center; | |
font-size: 36px; |
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
# serve with hot reload at localhost:8080 | |
npm run dev //這是開發版環境 | |
# build for production with minification | |
npm run build //這是正式版環境 |
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 name = 'ken'; | |
if ( name === 'ken'){ | |
alert('hi ken') | |
} |
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 name = 'bob'; | |
if ( name === 'ken'){ | |
alert('hi ken') | |
} else { | |
alert(" I don't know you") | |
} |
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 name = 'bob'; | |
if ( name === 'ken'){ | |
alert('hi ken') | |
} else if (name === 'bob' ) { | |
alert(" hi bob") | |
} else { | |
alert(" I don't know you") | |
} |
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 name = 'bob'; | |
if ( name === 'ken' || name === 'bob'){ | |
alert('hi ken or bob') | |
} | |
else { | |
alert(" I don't know you") | |
} |
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 name = 'bob'; | |
if ( name === 'ken' && name === 'bob'){ | |
alert('hi ken or bob') | |
} |
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
if ( firstName === 'ken' && secondName === 'bob'){ | |
alert('hi ken or bob') | |
} | |
var firstName = 'ken'; | |
var secondName = 'bob'; |
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 name = 'ken'; | |
if (!(name === 'bob')){ | |
alert('hi bob') | |
} |
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 myName = '驚不驚喜'; | |
function callName() { | |
console.log(this,this.myName); | |
} | |
var family = { | |
myName: '老王', | |
callName: callName | |
} | |
family.callName(); |
OlderNewer