File tree Expand file tree Collapse file tree 7 files changed +27
-0
lines changed
Expand file tree Collapse file tree 7 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ let bool = true ;
Original file line number Diff line number Diff line change 1+ const constVariable = 1 ;
2+ function constFunction ( ) {
3+ const constVariableInFunction = 2 ;
4+ console . log ( constVariable ) ;
5+ }
6+ constFunction ( ) ;
7+ //console.log(constVariableInFunction);
Original file line number Diff line number Diff line change 1+ //在ES6及之后,变量是通过let关键字声明的
2+ let letVariable = 1 ;
3+ function letFunction ( ) {
4+ let letVariableInFunction = 2 ;
5+ console . log ( letVariable ) ;
6+ }
7+ letFunction ( ) ;
8+ console . log ( letVariableInFunction ) ;
Original file line number Diff line number Diff line change 1+ let variable = null ;
Original file line number Diff line number Diff line change 1+ let number = 1 ;
Original file line number Diff line number Diff line change 1+ let string = "hello" ;
Original file line number Diff line number Diff line change 1+ //在ES6之前,变量是通过let关键字声明的
2+ var varVariable = 1 ;
3+ function varFunction ( ) {
4+ var varVariableInFunction = 2 ;
5+ console . log ( varVariable ) ;
6+ }
7+ varFunction ( ) ;
8+ //console.log(varVariableInFunction);
You can’t perform that action at this time.
0 commit comments