-
Notifications
You must be signed in to change notification settings - Fork 0
/
chap4.js
19 lines (15 loc) · 976 Bytes
/
chap4.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//1. Declare 3 variables in one statement.
var f_name,m_name,l_name;
//2. Declare 5 legal & 5 illegal variable names.
//legal
var first,second,third,fourth,fifth;
//illegal
var 1st,?onemptied,3inout,1my-name,10atob;
//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 _________
document.write("<h1>Rules for naming JS variables</h1>.<br> Variable names can only contain number,$,_ and alphabets.For example $my_1stVariablev <br>Variables must begin with anumber,$,_ or alphabet. For example $name, _name or name<br>Variable names are case Sensitive<br>Variable names should not be JS Keyword");
// document.write(" Rules For naming JS Variables")