Random javascript code snippets