Declaration and initialization of counter array
let counter1 = [ ] ; let counter2 = [ ] ; for ( let i = 0 ; i < MAX ; i ++ ) { counter1 [ i ] = 0 ; counter2 [ i ] = 0 ; } for ( let i = 0 ; i < l / 2 ; i ++ ) counter1 [ str [ i ] - ' ' ] ++ ; for ( let i = l / 2 ; i < l ; i ++ ) counter2 [ str [ i ] - ' ' ] ++ ; for ( let i = 0 ; i < MAX ; i ++ ) { if ( counter2 [ i ] != counter1 [ i ] ) return true ; } return false ; }