Sunday, February 9, 2014

Trivia about JavaScript Variables

  • Variables are typeless.
  • Act like containers
  • Prefixed with var keyword for declaration (Not mandatory)
  • variable name must begin with a letter (exception characters being $ or _ but not recommended)
  • variables are case sensitive  
  • Many variables can be declared and assigned (separated with a coma) with a single var prefix.
  • An unassigned variable will return 'undefined' when referred