Some code snippets for understanding confusing concepts of JavaScripts