Tony's Grossery is a grocery store located in Monstropolis. It is owned by Tony, who stocks the shelves every day to bring in customers. Activity: Tony’s Grossery 🍐
improving the code
Product portal problem: task
A bug report has been submitted. The code behind Tony’s Grossery’s portal, product page has been running a bit slow. The support team have looked at the code and have spotted that there is inefficient code being used for displaying all products. They have heard you might be able to use a fixed loop to make this more efficient. Can you help? Advice
Perhaps you can make this piece of code more efficient by using a fixed loop to display all 150 products that are stored in the array.
Use code clips to get the code needed
Getting started on the task
These notes below will guide you on solving this problem:
understand what the program is doing work out how to fix the problem carry out the improvement and check it Remember
Break the problem into small chunks!
Don’t try to do the whole program and then test it. Pick the bits that are easy to do first and get them working. This might not be the part of the program at the start. Test the program once that is working move onto another line and repeat.
You do not need to memorise any of the code!
Even the best programmers need to look up commands and the more you use the commands the more familiar they will become.
Everyone gets bugs!🐞
Even the most experienced programmers make mistakes. Try to fix one error at a time.
Good luck! 🍀