-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex10.js
More file actions
30 lines (29 loc) · 1.04 KB
/
index10.js
File metadata and controls
30 lines (29 loc) · 1.04 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
// 10. Do the following using JS Mathematic Expressions
// a. Declare a variable.
// b. Show the value of variable in your browser like “Value after
// variable declaration is: ??”.
// c. Initialize the variable with some number.
// d. Show the value of variable in your browser like “Initial value: 5”.
// e. Increment the variable.
// f. Show the value of variable in your browser like “Value after
// increment is: 6”.
// g. Add 7 to the variable.
// h. Show the value of variable in your browser like “Value after
// addition is: 13”.
// i. Decrement the variable.
// j. Show the value of variable in your browser like “Value after
// decrement is: 12”.
// k. Show the remainder after dividing the variable’s value by 3.
// l. Output : “The remainder is : 0”.**
var value1
console.log(value1)
var value2 = 5
console.log(value2)
var value3 = value2++
console.log(value2)
var value4 = value2 + 7
console.log(value4)
var value5 = --value4
console.log(value5)
var value6 = value5 / 3
console.log(value6)