0% found this document useful (0 votes)
154 views

Class Notes HTML CSS Chapter4

The document outlines rules for naming JavaScript variables: 1) Variable names can only contain letters, digits, underscores, and dollar signs (e.g. $my_1stVariable). 2) Variables must begin with a letter, underscore or dollar sign (e.g. $name, _name or name). 3) Variable names are case sensitive. 4) Variable names should not be JavaScript reserved words.

Uploaded by

Syed Shoaib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views

Class Notes HTML CSS Chapter4

The document outlines rules for naming JavaScript variables: 1) Variable names can only contain letters, digits, underscores, and dollar signs (e.g. $my_1stVariable). 2) Variables must begin with a letter, underscore or dollar sign (e.g. $name, _name or name). 3) Variable names are case sensitive. 4) Variable names should not be JavaScript reserved words.

Uploaded by

Syed Shoaib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

VARIABLE NAMES: LEGAL & ILLEGAL

Assignment # 4
JAVASCRIPT
VARIABLE NAMES: Legal & Illegal | JAVASCRIPT

1. Declare 3 variables in one statement.


2. Declare 5 legal & 5 illegal variable names.
3. Display this in your browser
a) A heading stating “Rules for naming JS variables”
b) Variable names can only contain ______, ______,
______ and ______.
For example $my_1stVariable
c) Variables must begin with a ______, ______ or
_____. For example $name, _name or name
d) Variable names are case _________
e) Variable names should not be JS _________

-- END --

Page 1 of 1

You might also like