Skip to content

Commit f6cff08

Browse files
committed
Update start lesson 4
1 parent 6e823b4 commit f6cff08

File tree

1 file changed

+1
-53
lines changed

1 file changed

+1
-53
lines changed

start/lesson4/index.html

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -18,59 +18,7 @@
1818
</head>
1919

2020
<body>
21-
<script>
22-
function compare(a, b){
23-
if (isNaN(a)){
24-
console.log('a is not a number');
25-
}else if (isNaN(b)){
26-
console.log('b is not a number');
27-
}else if (a<b){
28-
console.log('a is less than b');
29-
}else if (a==b){
30-
console.log('a equals b');
31-
}else{
32-
console.log('a is greater than b');
33-
}
34-
}
35-
36-
function weekend(){
37-
const day = new Date().getDay();
38-
39-
return (day==0 || day==6) ? "It's the weekend" : "It's not the weekend";
40-
}
41-
42-
function today(){
43-
const day = new Date().getDay();
44-
45-
switch(day){
46-
case 0:
47-
console.log('Today is Sunday');
48-
break;
49-
case 1:
50-
console.log('Today is Monday');
51-
break;
52-
case 2:
53-
console.log('Today is Tuesday');
54-
break;
55-
case 3:
56-
console.log('Today is Wednesday');
57-
break;
58-
case 4:
59-
console.log('Today is Thursday');
60-
break;
61-
case 5:
62-
console.log('Today is Friday');
63-
break;
64-
case 6:
65-
console.log('Today is Saturday');
66-
break;
67-
default:
68-
console.log('getDay returned value out of range');
69-
break;
70-
71-
}
72-
}
73-
</script>
21+
7422
</body>
7523

7624
</html>

0 commit comments

Comments
 (0)