javascript snippets for fundamentals of JS