Question: 5 4 points Use JSFiddle to create a program to help encourage the user to eat vegetables: Use a prompt statement to welcome the user
points
Use JSFiddle to create a program to help encourage the user to eat vegetables:
Use a prompt statement to welcome the user to the site and ask the user's name
Nest a condition inside a while loop that:
uses prompt or confirm to welcome the user and ask if they have eaten their vegetables today
displays a statement that either congratulates or denigrates the user depending on whether or not they have eaten their vegetables
stops when the user has eaten their vegetables three times this is the tricky part use a variable inside the loop to keep track of how many times veggies are eaten
End with a positive statement that includes the user's name captured from the initial prompt statement and praise for their vegetable eating prowess.
Include appropriate comments throughout one short comment at the beginning describing the purpose of the code and one comment for every new procedure.
Use document.write to display your results.
A score of ZERO will be assigned for code that uses console.log in JSFiddle.
Paste your JSFiddle link in the box below:
Edit View Insert Format Tools Table
pt Paragraph
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
