Skip to content

JavaScript-II by Paul DeYonghe - #311

Open
pdeyo70 wants to merge 2 commits into
bloominstituteoftechnology:masterfrom
pdeyo70:master
Open

JavaScript-II by Paul DeYonghe#311
pdeyo70 wants to merge 2 commits into
bloominstituteoftechnology:masterfrom
pdeyo70:master

Conversation

@pdeyo70

@pdeyo70 pdeyo70 commented Aug 18, 2018

Copy link
Copy Markdown

This is mostly completed. I have left undone the creativity-oriented exercises in array-menthods.js, mainly due to time constraints. These and the stretch goals are all I have left undone.

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

✔️ What Went Well:

  • Callbacks
  • Array Methods
  • Closures
  • Arrow Function syntax
  • Easy to understand commit messages

🎗 Recommendation(s):

  • There were a bit of formatting and syntax issues.

Other:

  • Aside from the comment you made earlier about what you did and did not complete, it seems like you are understanding the material!
  • 2/3

// 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 = [];
const forEachCallback = (item, index, array) => {
fullName.push(item.first_name + item.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.

I would suggest adding a space in between first_name and last_name.

Comment thread assignments/callbacks.js
// Pass true to the callback if it is, otherwise pass false.
let tempArr = [];
for (let i = 0; i < list.length; i++){
if list[i] === item;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I know what you are trying to output but the way that it is written is incorrect.

Comment thread assignments/callbacks.js
tempArr.push(list[i]);
}

if tempArr.length !== 0 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please wrap your boolean argument in parantheses - good coding practice :D

Comment thread assignments/closure.js
// newCounter(); // 1
// newCounter(); // 2

constant newCounter = counter();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you mean const instead of constant?

// 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.push(runners.filter(runner => 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.

Nice work here!

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