Variables

Identifiers in JavaScript

Names of Variables The rules for naming of  Identifiers(Variables ,Methods and Classes) is basically the same as in other languages. Names can begin with an alphabet, $ or _. All these are legal names:  $a=10, $_a=1, _$a1,a1, ab1cd etc. Keywords cannot be names but can contain keywords. Thus char. class etc is not allowed.…