Skip to content

jcassidy - #203

Open
cassidyjamesw wants to merge 1 commit into
bloominstituteoftechnology:masterfrom
cassidyjamesw:master
Open

jcassidy#203
cassidyjamesw wants to merge 1 commit into
bloominstituteoftechnology:masterfrom
cassidyjamesw:master

Conversation

@cassidyjamesw

Copy link
Copy Markdown

No description provided.

@zackhitch zackhitch 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.

Great job! Take a look at the function conversion project, as we will be using that arrow function syntax of ES6 frequently moving forward.

// 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(function(element) {
fullName.push(element.first_name + ' ' + element.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.

// ==== Challenge 2: Use .map() ====
// 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 = [];
let allCaps = fullName.map(x => x.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.

Nice use of the fullName array instead of the runners array. And by keeping this to one line, you forgo the need to for curly braces or the need to explicitly state return. Well done.

// 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 = [];
let largeShirts = runners.filter((shirt) => {
return shirt.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.

let ticketPriceTotal = [];

let ticketPriceTotal = runners.reduce((donations, item) => {
return donations += item.donation;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment thread assignments/callbacks.js
@@ -2,33 +2,75 @@ const items = ['Pencil', 'Notebook', 'yo-yo', 'Gum'];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great work! 🙌

Comment thread assignments/closure.js
add();
console.log(add())

/* STRETCH PROBLEM, Do not attempt until you have completed all previous tasks for today's project files */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💪 push yourself to complete all the tasks and stretch problems!

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