Literals are constant values that represents various data types like numeric, string, array , boolean etc and can be assigned to variables.
Variables are containers for holding data values.
We can assign the value to variables using equal to(=) operator at the time of declaration or anytime before using it.
var <variable-name> = <value>
Rules for variable name construction:
Names can contain letters, digits, underscore and dollar sign.
There is no limit to the length of variable name.
Names can begin with letter , $ or _ sign
We cannot use reserve words as variable names
Single-Line Comment- Using //
Multi-Line Comments -Using /* */
To watch detail explaination, please refer the video below: