Open
Conversation
grod220
suggested changes
Aug 11, 2019
grod220
left a comment
There was a problem hiding this comment.
Try not to commit .DS_Store. You may want to add this to your .gitignore file.
Some things are missing:
step2-3.js
step2-4.js
step2-5.js
step2-7.js
step3.js
| const salaryPerDay = timeInHours.map(hoursPerDay => hoursPerDay * hourlyRate); | ||
| const totalSalary = salaryPerDay.reduce((sum, dailySalary) => sum + dailySalary, 0); | ||
| const euroSalary = totalSalary.toFixed(2); | ||
| return euroSalary; |
Week3/homework/step2-2.js
Outdated
| if (i % 3 === 0) { | ||
| threeCallback[i]; | ||
| } else if (i % 5 === 0) { | ||
| fiveCallback[i]; |
There was a problem hiding this comment.
Not quite there. You need to call the function. So instead of
fiveCallback[i];
You'd do
fiveCallback(i)
grod220
suggested changes
Aug 14, 2019
| @@ -11,4 +11,6 @@ console.log(addSix(10)); // returns 16 | |||
| console.log(addSix(21)); // returns 27 | |||
|
|
|||
| // Do not change or remove anything below this line | |||
There was a problem hiding this comment.
Above, you'll need to add code to make createBase function work
| function makeUnique(arr) { | ||
| // Replace this comment and the next line with your code | ||
| console.log(arr); | ||
| arr = new Set(arr); |
There was a problem hiding this comment.
Nice technique using Set data structure 👍
|
|
||
| // In the second function, the value of y is an object containing a key and a value. | ||
| // when the object is passed in the function, one is added to the value of the object itself | ||
| // and the value of the value increases by 1 and we get {x: 10} |
There was a problem hiding this comment.
I think you get it (?). Another example:
let a = 4
let b = a
a += 1
What's the value of b?
vs objects...
let a = { name: 'gabe' }
b = a
a.country = 'us'
what's the value of b?
Do you see the difference?
grod220
approved these changes
Aug 14, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.