Improved 'if' and 'ife' snippets for js.
Improvements to the js snippets by Harry Xu.