-
-
Notifications
You must be signed in to change notification settings - Fork 120
Exercise is done #25
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
Exercise is done #25
Conversation
Misprint correction
// to calculate sum of all given arguments | ||
// For example sum(1, 2, 3) should return 6 | ||
if (args.length === 0) return 0; | ||
let i = 0, |
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.
let i = 0, | |
let i = 0; |
// For example sum(1, 2, 3) should return 6 | ||
if (args.length === 0) return 0; | ||
let i = 0, | ||
sum = 0; |
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.
sum = 0; | |
let sum = 0; |
do { | ||
sum += args[i]; | ||
i++; | ||
} while (args[i]); |
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.
} while (args[i]); | |
} while (i < args.length); |
// } | ||
const ageList = {}; | ||
for (const index in persons) { | ||
ageList[index] = persons[index]['died'] - persons[index]['born']; |
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.
ageList[index] = persons[index]['died'] - persons[index]['born']; | |
const person = persons[index]; | |
ageList[index] = persons.died - persons.born; |
@@ -5,7 +5,7 @@ | |||
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>", | |||
"license": "MIT", | |||
"scripts": { | |||
"test": "eslint ./Exercises; hpw" | |||
"test": "eslint ./Exercises && hpw" |
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.
Don't change package.json
No description provided.