modified if snippet in javascript
added to js snippets | created go snippets