Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Add console outputs and fix some mistakes #8

wants to merge 1 commit into from

Conversation

jn-lp
Copy link

@jn-lp jn-lp commented Aug 26, 2018

No description provided.

Copy link
Member

@tshemsedinov tshemsedinov left a 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.
Copy link
Member

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.
Copy link
Member

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
*/
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtf?

@jn-lp
Copy link
Author

jn-lp commented Aug 27, 2018

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 CRLF and no Eslint. As for the style of comments - understood, accepted.

@tshemsedinov
Copy link
Member

@jn-lp see https://help.github.com/articles/dealing-with-line-endings/ and github has builtin simple editor for such situations working in web.

@jn-lp
Copy link
Author

jn-lp commented Aug 27, 2018

@tshemsedinov, ok thanks

@jn-lp jn-lp closed this Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants