Repository navigation
Sofia levin: MVP - #1
Conversation
| runners.forEach(function(runners) { | ||
| fullName.push(runners.first_name + ' ' + runners.last_name) | ||
| }) | ||
|
|
There was a problem hiding this comment.
great job, I would encourage you to look at string template literals
|
|
||
| totalTshirts.push("XS: " + xsShirts, "S: " + sShirts, "M: " + mShirts, "L: " + lShirts, "XL: " + xlShirts, "2XL: " + xxlShirts, "3XL: " + xxxlShirts) | ||
| console.log(totalTshirts) | ||
|
|
There was a problem hiding this comment.
good job going above and beyond what you needed to do
| contains('Gum', items, function(result) { | ||
| console.log(result); | ||
| }) | ||
|
|
There was a problem hiding this comment.
function contains(item, list, cb) {
// contains checks if an item is present inside of the given array/list.
// Pass true to the callback if it is, otherwise pass false.
for (let i = 0; i < list.length; i++) {
if (list[i] === item) {
return cb(true);
}
}
return cb(false);
}
contains('Bats', items, function(flag) {
console.log(flag); // should be false
});
contains('Notebook', items, function(flag) {
console.log(flag); // should be true
});
AsaOfDiamonds
left a comment
There was a problem hiding this comment.
good job on your project. I put some comments in your code below and a few examples
No description provided.