Snippets of js code