Declaring Variable and Re-declaring Variables in JavaScript

Declaring Variable

Declaring Variable Rule

  • Variable can contain a combination of letters, digits, underscores ( _ ), and
  • dollar signs ( $ ).
  • Must begin with a letter A-Z or a-z or underscore or dollar sign
  • A variable name cannot start with a number
  • Must not contain any space characters
  • JavaScript is case-sensitive
  • Can‟t use reserved keywords

Declaring Variable

A variable declared without a value will have the value undefined

Tagged : / /

Leave a Reply