-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
51 lines (35 loc) · 982 Bytes
/
test.html
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
<!DOCTYPE html>
<html>
<head>
<!-- Font Awesome Icon Library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<script>
if (true) {
let x = 5;
}
console.log(typeof x);
function sayHello(name) {
return 'Hello, ' + name + '!';
};
const sayHello1 = (name) => { 'Hello, ' + name + '!' };
// #2
const sayHello2 = name => { 'Hello, ' + name + '!' };
// #3
const sayHello3 = (name) => `Hello, ${name}!`;
console.log(sayHello());
console.log(sayHello1());
console.log(sayHello2());
console.log(sayHello3());
// let numbers = [1, 2, 3, 4, 5];
// numbers.map(n => n * 3)
//
// console.log(numbers);
const isDivisibleBy3 = n => n % 3 === 0;
const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
console.log(numbers.filter(isDivisibleBy3));
console.log(numbers);
</script>
</body>
</html>