Skip to content

Kendra Williams - Javascript II - #256

Open
codingforkicksOG wants to merge 9 commits into
bloominstituteoftechnology:masterfrom
codingforkicksOG:master
Open

Kendra Williams - Javascript II#256
codingforkicksOG wants to merge 9 commits into
bloominstituteoftechnology:masterfrom
codingforkicksOG:master

Conversation

@codingforkicksOG

Copy link
Copy Markdown

@John-Spraul John-Spraul left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  • Git stuff
  • Completed Assignment
  • Stretch problems/goal(s)

You did very well on this assignment, keep up the great work! 🎉 💯

Comment thread assignments/callbacks.js

//displays callback
const displayCallback = (arr) => {
console.log(arr);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arr is a misleading placeholder, since not everything passed to displayCallback will be an array

Comment thread assignments/callbacks.js
cb(true);
}else{
cb(false);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this works 👍
You could also do cb(list.includes(item), without the if/else since .includes returns either true or false

// The event director needs both the first and last names of each runner for their running bibs. Combine both the first and last names into a new array called fullName.
let fullName = [];
runners.forEach(runner => {
fullName.push(`${runner.first_name} ${runner.last_name}`)});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

for readability, better to have it like:

runners.forEach(runner => {
    fullName.push(`${runner.first_name} ${runner.last_name}`);
});

// The event director needs to have all the runner's first names converted to uppercase because the director BECAME DRUNK WITH POWER. Convert each first name into all caps and log the result
let allCaps = [];
allCaps = runners.map(runner => {
return runner.first_name.toUpperCase()});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔁 (same as above)

// The large shirts won't be available for the event due to an ordering issue. Get a list of runners with large sized shirts so they can choose a different size. Return an array named largeShirts that contains information about the runners that have a shirt size of L and log the result
let largeShirts = [];
largeShirts = runners.filter(runner => {
return runner.shirt_size === "L"});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔂

//{"id":50,"first_name":"Shell","last_name":"Baine","email":"[email protected]","shirt_size":"M","company_name":"Gabtype","donation":171}];
// Problem 2
let intelRunners = [];
intelRunners = runners.filter(runner => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

would have liked to see a map here, instead of using filter again

Comment thread assignments/closure.js
const hiKendra = name("Kendra");
const hiJohn = name("John");
hiKendra();
hiJohn();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👋

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