-
Notifications
You must be signed in to change notification settings - Fork 7
Completed Week 3 JavaScript assignments Daryna Tkachenko #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
base: main
Are you sure you want to change the base?
Completed Week 3 JavaScript assignments Daryna Tkachenko #8
Conversation
dardecena
left a comment
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.
Fantastic job!!
| return numbers | ||
| .filter(number => number % 2 === 0) | ||
| .map(number => number * 2); |
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.
Great job! Clean and concise ⭐
| function computeEarnings(tasks, hourlyRate) { | ||
| const total = tasks | ||
| .map(task => task.duration / 60 * hourlyRate) | ||
| .reduce((sum, value) => sum + value, 0); | ||
| return `€${total.toFixed(2)}`; |
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.
Nice! Clear naming for function parameters. Clean code and nice use of string templating.
| function sanitizeFruitBasket(basket, fruitToRemove) { | ||
| return basket.filter(fruit => fruit !== fruitToRemove); | ||
| } |
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.
Way to go! Clear, easy-to-read function.
|
|
||
| sanitizeFruitBasket.length; | ||
| expect(sanitizeFruitBasket.length).toBe(2); |
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.
👍
|
|
||
| sanitizeFruitBasket(fruitBasket, 'lemon'); | ||
| expect(fruitBasket).toEqual(originalFruitBasketContents); |
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.
👍
| c: 'amount, this, wallet' | ||
| }, | ||
| answer: '?', | ||
| answer: 'b', |
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.
👍
| c: 'transferInto, anonymous' | ||
| }, | ||
| answer: '?', | ||
| answer: 'c', |
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.
👍
| c: 'Step' | ||
| }, | ||
| answer: '?', | ||
| answer: 'a', |
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.
👍
| c: 'Transferring € 50,00 from Jack to Jane' | ||
| }, | ||
| answer: '?', | ||
| answer: 'a', |
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.
👍
| c: 'Jane' | ||
| }, | ||
| answer: '?', | ||
| answer: 'c', |
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.
👍
|
Thank you very much for reviewing my work, I appreciate your feedback!!! |
No description provided.