uniformed loops and change them to pre-increment, changed loose to strict comparison for string & numbers, minor formatting modifications no functional changes
uniformed loops and change them to pre-increment, changed loose to strict comparison for string & numbers, minor formatting modifications no functional changes

dperini/nwevents