Skip to content

Commit 46625e6

Browse files
committed
Added knowledge.map
1 parent b34be10 commit 46625e6

4 files changed

Lines changed: 18 additions & 2 deletions

File tree

.jshintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"esversion": 6,
3+
"node": true
4+
}

JavaScript/4-introspection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ console.dir({
2626
max: max.length
2727
});
2828

29-
console.log('Anonymous function: ' + function(x) { return x }.name);
29+
console.log('Anonymous function: ' + function(x) { return x; }.name);
3030
console.log('Anonymous lambda' + (x => x).name);
3131

3232
console.log('toString: ');

JavaScript/6-spread.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ let f1 = (...args) => console.log(args);
55
f1(1, 2, 3);
66

77
let f2 = (...args) => {
8-
args.forEach(arg => console.log(typeof(arg) + ': ' + arg));
8+
args.forEach(arg => {
9+
if (typeof(arg) === 'object') {
10+
console.log(typeof(arg) + ': ' + JSON.stringify(arg));
11+
} else {
12+
console.log(typeof(arg) + ': ' + arg);
13+
}
14+
});
915
};
1016

1117
f2(1, 'Marcus', { field: 'value' });

knowledge.map

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
description: {
3+
ru: 'Функция (отображение) - это обобщение или абстракция кода, предполагающая вызовы с разными аргументами и/или из разных мест кода, и задающее соответствие отображения между аргументами и результатом'
4+
},
5+
dependencies: ['Iteration']
6+
}

0 commit comments

Comments
 (0)