🍽️

Mobile Ordering App

This document contains a hint for the Restaurant Ordering App solo project.

PS: Please remember that we have both a #javascript-help channel and a #html-css-help channel in our Discord community. If you have a very specific issue you’re struggling with, you should consider posting it there.

JavaScript hints

  1. You can use an array method to iterate over the data and create HTML string for each menu item.
  2. You can use a data-attribute to link a button to a menu item.
  3. When an item is added to an order, you will need to push its object to an array of orders and iterate over that array to generate html string.
  4. To remove an order, you will need to figure out the index of that menu item’s object in the array of orders.
  5. ⚠️  The strict equality operator (===) will return false unless you are comparing the same data types. For example: console.log(1 === ‘1’) // false The first 1 is a number, the second ‘1’ (with inverted commas) is a string. You can check a data type using typeof and then google how to change, say, a string to a number or vice versa if necessary!

If you are still struggling for hours with this Solo Project after having used the above hints, please let the teacher Tom Chant know via the #general channel on Discord, and we will consider adding more hints. Important: be sure to include a link to your scrim, so that he can understand what you are struggling with.