Table of Content

Best Practices & Coding Conventions

Variable, Function Names : Camel Case
Constants : Upper Snake Case
Class Name : Pascal Case

Miscellaneous Points

  • Before ES6 variables where function scoped in JS
  • Var gets hoisted to global scope when used in for loop declaration
  • Closure is an function and its environment (variables on which the function depends)
  • Primitive Datatypes: Boolean, Null, Undefined, Number, String, Symbol & Non-Primitive Datatype: Object
  • 0 in front of a number in JS means its in octal (Wont work in strict mode)