A site where you can order food with JavaScript
Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next?
I realised that I wanted a loop that continued to ask the costumer for their choice of food, until they wrote a valid answer. So I had to google how to do that (w3school was helpful). Then I had to try a few different versions of my code before i finally worked (For example: Setting foodChoice to null in wait of an answer did not work. Setting it to "Apple" worked.).
I had a hard time making the subtype ordering function to work. After a while, I moved the declaration of subtype and order outside of the conditional statement, and just reassigned the values inside the conditional statement. Then it worked!
If I had more time I'd put in "while"-loops for the other choices as well. I would also like it to approve "Yes" as an answer at the final step instead of only approving "yes".
Here is my site: https://clever-cendol-83931b.netlify.app/