Changes between Initial Version and Version 2 of Ticket #15192
- Timestamp:
- May 26, 2017, 6:29:28 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #15192 – Description
initial v2 1 I am wondering why you are excluding '===' and '!=='validation from jshint.1 I am wondering why you are excluding `===` and `!==` validation from jshint. 2 2 3 3 When I am evaluating code by using jshint I am getting many warning: 4 4 5 Expected '!==' and instead saw '!='.5 Expected `!==` and instead saw `!=`. 6 6 7 7 One of critical issue in your core widget on line 35 … … 11 11 You are implemented for loop such as: 12 12 13 {{{#!javascript 13 14 for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { 15 }}} 14 16 15 however "( elem = elems[ i ] )"will never will be null i most cases is "undefined"17 however `( elem = elems[ i ] )` will never will be null i most cases is "undefined" 16 18 17 19 If I will change to strong type such as: 18 20 21 {{{#!javascript 19 22 for ( i = 0; ( elem = elems[ i ] ) !== null; i++ ) { 23 }}} 20 24 21 25 I will be in infinite loop and browser will be freezes. … … 24 28 I will suggest make changes and fix this loops as well either: 25 29 30 {{{#!javascript 26 31 for ( i = 0; ( elem = elems[ i ] ) !== undefined; i++ ) 32 }}} 27 33 or 34 {{{#!javascript 28 35 for ( i = 0; !!( elem = elems[ i ] ); i++ ) 36 }}} 29 37 30 38 to handle null and undefined