Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
// Code your solutions in this file
const gifts = ['teddy bear', 'drone', 'doll'];

function wrapGifts(gifts) {
for (let i = 0; i < gifts.length; i++) {
console.log(`Wrapped ${gifts[i]} and added a bow!`);
}

return gifts;
}

wrapGifts(gifts);

const thankYouCards = [];

function writeCards(array, event) {
for(let i =0; i < array.length; i++){
thankYouCards.push(`Thank you, ${array[i]}, for the wonderful ${event} gift!`);
}; return thankYouCards;
};
Comment on lines +14 to +20

Choose a reason for hiding this comment

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

Suggested change
const thankYouCards = [];
function writeCards(array, event) {
for(let i =0; i < array.length; i++){
thankYouCards.push(`Thank you, ${array[i]}, for the wonderful ${event} gift!`);
}; return thankYouCards;
};
function writeCards(array, event) {
let thankYouCards = [];
for(let i =0; i < array.length; i++){
thankYouCards.push(`Thank you, ${array[i]}, for the wonderful ${event} gift!`);
};
return thankYouCards;
};


function countDown(number){
while (number >= 0) {
console.log(number--);

Choose a reason for hiding this comment

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

Clever!

};
};