snippets for js