forked from HackYourFuture/JavaScript1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayground.js
More file actions
67 lines (54 loc) · 1.07 KB
/
playground.js
File metadata and controls
67 lines (54 loc) · 1.07 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
/*let s = "Hello".toLowerCase();
let l = s.length;
function sum(a, b) {
return a + b;
}
let max = function (a, b) {
return a > b ? a : b;
}
let s1 = sum(4, 5);
let s2 = 4 + 5;
if (s2 == s1) {
console.log("same");
} else {
console.log("not same");
}
*/
/* Statemens:
let s2 = 4 + 5;
console.log("not same");
let s = "Hello".toLowerCase();
let l = s.length;
*/
/* Expressıons:
sum(a, b)
sum(4, 5)
"Hello".toLowerCase();
(s2 == s1)
*/
/*const shoes = "blue";
const shirt = "red";
const pants = "green";
if (shoes === "green" && shirt === "green" && pants === "green" ) {
console.log("all of clothes are green");
}
if (shoes === "green" || shirt === "green" || pants === "green" ) {
console.log("one of clothes are green");
}
if (pants === "green" ) {
console.log("your pants are green");
}
*/
const month ="April";
let season ="";
switch (month) {
case "January":
season = "winter";
break;
case "April":
season ="spring" ;
break;
default:
season = "summer";
}
console.log(season);