@@ -12,7 +12,7 @@ import {
1212function buzz ( ) { return 0 ; }
1313
1414// noinspection JSUnusedGlobalSymbols, JSCommentMatchesSignature
15- var foo = {
15+ let foo = {
1616
1717 numbers : [ 'one' , 'two' , 'three' , 'four' , 'five' , 'six' ] ,
1818 data : {
@@ -27,7 +27,7 @@ var foo = {
2727 fOne : function ( a , b , c , d ,
2828 e , f , g , h ) {
2929 // noinspection JSUnusedLocalSymbols
30- var x = a
30+ let x = a
3131 + b
3232 + c
3333 + d
@@ -38,16 +38,17 @@ var foo = {
3838 // noinspection JSUnresolvedFunction
3939 fTwo ( a , b , c , fThree ( d , e , f , g , h ) ) ;
4040 // noinspection JSUnusedAssignment
41- var z = a
41+ let z = a
4242 === 'Some string' ? 'yes' : 'no' ;
4343 // noinspection JSUnusedAssignment
4444 z = a === 10 ? 'yes' : 'no' ;
45- var colors = [ 'red' , 'green' , 'blue' , 'black' , 'white' , 'gray' ] ;
45+ let colors = [ 'red' , 'green' , 'blue' , 'black' , 'white' , 'gray' ] ;
4646 // noinspection JSUndeclaredVariable
4747 for ( j = 0 ; j < 2 ; j ++ ) i = a ;
48- // noinspection JSUnusedLocalSymbols
49- for ( var i = 0 ; i
48+ // noinspection JSUnusedLocalSymbols, ES6ConvertVarToLetConst
49+ for ( let i = 0 ; i
5050 < colors . length ; i ++ )
51+ // eslint-disable-next-line no-var
5152 var colorString = this . numbers [ i ] ;
5253 } ,
5354
@@ -95,7 +96,7 @@ var foo = {
9596 else if ( a === 'two' ) {
9697 return 2 ;
9798 }
98- var number = - 10 ;
99+ let number = - 10 ;
99100 // noinspection JSUnresolvedVariable
100101 while ( x < 0 ) {
101102 number = number + 1 ;
@@ -108,7 +109,7 @@ var foo = {
108109
109110 fThree : function ( strA , strB , strC , strD , strE ) {
110111 // noinspection JSCheckFunctionSignatures
111- var number = prompt ( "Enter a number:" , 0 ) ;
112+ let number = prompt ( "Enter a number:" , 0 ) ;
112113 switch ( number ) {
113114 case 0 :
114115 alert ( "Zero" ) ;
0 commit comments