Repository navigation
Expand file tree
/
Copy patharrow.js
More file actions
74 lines (50 loc) · 1.32 KB
/
Copy patharrow.js
File metadata and controls
74 lines (50 loc) · 1.32 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
70
71
72
73
74
// const filter = (array, test) => {
// const filteredArray = [];
// for (const el of array) {
// console.log(el);
// console.log(test(el));
// const passed = test(el)
// if (passed) {
// filteredArray.push(el);
// }
// }
// return filteredArray;
// }
// const callback1 = value => value >= 3;
// const r1 = filter([1, 2, 3, 4, 5], value => value >= 3);
// console.log(r1);
// const add = function (a, b, c) {
// console.log(a, b, c);
// return a + b + c;
// }
// const addArro2 = (a, b, c) => {
// console.log(a, b, c);
// return a + b + c;
// }
// const addArrow = (...args) => console.log(...args);
// console.log(add(5, 10, 15));
// console.log(addArrow(5, 10, 15));
// const add = function (a, b) {
// return a + b;
// }
// console.log(add(2, 3))
// const add = function () {
// console.log(arguments);
// }
// add(2, 3, 4, 5, 6)
// const add1 = (...args) => {
// console.log(...args)
// }
// add1(2, 3, 4, 5, 6)
// const user = {
// fullName: 'Mango',
// showName() {
// console.log('this: ', this)
// console.log('this name: ', this.fullName)
// const inner = () => {
// console.log('this in inner: ', this)
// }
// inner()
// }
// }
// user.showName();