ghofranebenhmaid / hyf-homework

HYF
0 stars 2 forks source link

Homework Feedback JS1-week2 #4

Closed Swapna-Sahu closed 4 years ago

Swapna-Sahu commented 4 years ago

Something went wrong with your code . Please check . Below is the feed back for the code which is uploaded : Flight booking full name function - no need to write this function twice.

Event application

I don’t know why do you use “for ” here for(var i=eventDay ; i>6;) - for is used when you want to do loop but I don’t see you used for that . Maybe you want to write like this: var i=eventDay ; if(i>6){ eventDay = eventDay-7; i = eventDay; }

Weather wear is incomplete. Student Manger and Candy Helper is missing

ghofranebenhmaid commented 4 years ago

I use the for-loop, because I need a number that i less or equal to 6 in order to find the right weekday in the array which goes from 0-6 .. if I start with a big number, subtracting 7 only once wouldn't be enough ..

Swapna-Sahu commented 4 years ago

Feedback for rest of the task -- Great work 👍 . Student Manager Task : It is not taking two Queen and also when the class is full then it should take Queen as well but it is not working here.

Candy Helper Task : Line -128 var amountToSpend = 16; You do not assign the amount it will take from the random method. Try removing it , it works fine.

try to avoid var. I know because you are testing in console so you might have issue . Just refresh the page and work . It will not say already defined. But it is working fine 👍 .

Enjoy coding :)