-
Notifications
You must be signed in to change notification settings - Fork 0
Cp2 #11
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: gh-pages
Are you sure you want to change the base?
Cp2 #11
Conversation
reneemeyer
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.
good job, see comments below
| const evens = strNums.filter((numbers) => { | ||
| return numbers % 2 == 0 | ||
| }); | ||
| const sumEvens = evens.reduce((total, numbers) => { |
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.
good job, however you don't need the filter, you could do this
const sumEvens = nums.reduce((total, num) => {
if(num % 2 === 0){
total = total + num
}
return total
},0)|
|
||
| //using a higher order function, create an array of the unique 'weather_state_name' values of the weather array. Your function should return the following array ['Light Cloud', 'Heavy Cloud', 'Showers'] | ||
| const weatherStates = weather.map((hoge) => { | ||
| return hoge['weather_state_name']; |
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.
where is 'hoge' defined? do you mean weather? also this doesn't filter out the non unique states
| //find the id of the object in weather that has a min_temp of 15.915 | ||
|
|
||
| const idealTemp = weather.find((hoge) => { | ||
| return hoge['min_temp'] == 15.915; |
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.
where is 'hoge' defined? do you mean weather?
Checkpoint Rubric
This is the rubric that your instructor will use to grade your checkpoints. Please do not edit.
Checkpoint 1
Checkpoint 2
Checkpoint 3