-
Notifications
You must be signed in to change notification settings - Fork 9
/
chapters_2-4(CMAD).txt
187 lines (40 loc) · 1.52 KB
/
chapters_2-4(CMAD).txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
1) What is the keyword that declares a variable?
2) how to declare a variable?
3) how to declare multiple variables in one line/statement?
4) In a single statement declare a variable and assign a string to it.
5) Assign a string to a variable that has already been declared.
6) This statement has already been coded.
var bestMan = "Charlie";
Assign the variable a new string value.
7) how to alert a variable?
8) If a number is enclosed in quotes, it's a ______. example.("10")?
9) What is the value of total?
var a = 100;
var b = 10;
var total = a + b;
10) alert('10' + '20');
11) alert(10 + '20');
12) In a single statement declare a variable and assign a number to it.
13) Rewrite this using camelCase.
var Nameofband;
14) Legal and Illegal variables names.
a) COUNT
b) 1st
c) _file1
d) FILE*
e) $count
f) The Answer
g) user$name
h) alert
i) HOME_DIRECTORY
15) var num = "3"; Statement is true or false?
16) var num1 = 15, num2 = 10; Statement is true or false?
17) What is the value in variables num1 and num2
var num1 = num2 = 4;
18) Which of the following are legal and illegal
a) var $ = 10;
b) var _ = 50;
c) var a_ = 10;
d) var *a = 5;
e) var a*a = 5;
19) alert("<div></div>");