-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.js
More file actions
72 lines (58 loc) · 1.52 KB
/
Copy pathindex.js
File metadata and controls
72 lines (58 loc) · 1.52 KB
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
Try creating one of each type of comment.
//Hello World
/*
This is sample.
*/
Use the var keyword to create a variable called myName.
// Example
var ourName;
// Define myName below this line
var myName;
Assign the value 7 to variable a.
Assign the contents of a to variable b.
// Setup
var a;
var b = 2;
// Only change code below this line
var a = 7;
var b = a;
Creates a new variable called myVar and assigns it an initial value of 0.
// Example
var ourVar = 19;
// Only change code below this line
var a = 9;
Initialize the three variables a, b, and c with 5, 10, and "I am a" respectively so that they will not be undefined.
// Initialize these three variables
var a = 5;
var b = 10;
var c = "I am a";
// Do not change code below this line
a = a + 1;
b = b + 5;
c = c + " String!";
Modify the existing declarations and assignments so their names use camelCase.
Do not create any new variables.
// Declarations
var studlyCapVar;
var properCamelCase;
var titleCaseOver;
// Assignments
studlyCapVar = 10;
properCamelCase = "A String";
titleCaseOver = 9000;
Change the 0 so that sum will equal 20.
var sum = 10 + 10;
Change the 0 so the difference is 12.
var difference = 45 - 33;
Change the 0 so that product will equal 80.
var product = 8 * 10;
Change the 0 so that the quotient is equal to 2.
var quotient = 66 / 33;
Change the code to use the ++ operator on myVar.
var myVar = 87;
// Only change code below this line
myVar ++;
Change the code to use the -- operator on myVar.
var myVar = 11;
// Only change code below this line
myVar--;