-
-
Notifications
You must be signed in to change notification settings - Fork 120
Add console outputs and fix some mistakes #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not informative comments
key, '\t', typeof(key), '\t', | ||
value, '\t', typeof(value) | ||
key, '\t', typeof(key), '\t', // first string ... fifth string //etc. | ||
value, '\t', typeof(value) // 7 number ... 2 number //etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange output comments
@@ -8,5 +8,5 @@ numbers[5] = 20; | |||
|
|||
for (const i in numbers) { | |||
const value = numbers[i]; | |||
console.log(i, typeof(i), value); | |||
console.log(i, typeof(i), value); // 0 string 7 ... field1 string Value1 //etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gives nothing
5 'number' 20 | ||
2 'number' 1 | ||
20 'number' undefined | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks better
@@ -2,15 +2,15 @@ | |||
|
|||
const numbers = [7, 10, 1, 5, 2]; | |||
numbers.forEach((item, i, arr) => { | |||
console.log(i, arr, item); | |||
console.log(i, arr, item); // 0 [7, 10, 1, 5, 2] 7 ... 4 [7, 10, 1, 5, 2] 2 //etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad style, long lines, not informative
.map(x => x * 2) | ||
.map(log) // 0 14 // 1 20 // 2 2 // 3 10 // 4 4 | ||
.map(x => ++x) | ||
.map(log); // 0 15 // 1 21 // 2 3 // 3 11 // 4 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wtf?
The most of the changes were written on the go in mobile code editors, not using a terminal - just the brain. -This is why I used |
@jn-lp see https://help.github.com/articles/dealing-with-line-endings/ and github has builtin simple editor for such situations working in web. |
@tshemsedinov, ok thanks |
No description provided.