I wish to then add javascript in wordpress, when something similar to

if(iNum==0&&iNum+1!=l) 

it show wrong, within the source code I've found & become & how you can solve? Thanks.

if(iNum==0&\& iNum+1!=l)

Where have you put that code?

To place arbitrary javascript code, you should utilize HTML mode in publish / page edit window.
To achieve that, simply click on 'HTML' just above editor window (right of Upload/Insert tools)