Skip to content

emmydieden/project-pizza

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

Project Name

This project was a part of the first sprint of the Technigo web developer bootcamp and the aim was to learn basic Javascript concepts like variables, conditionals and native methods.

The problem

Using conditional operators as if/else statements, switch statements and ternary statements the user gets to choose between dishes and different subcategories. The hardest part was to get dry code for a switch statement where the user got to chose 1, 2 or 3 for a subcategory of the main dishes pizza, pasta and salad. First I declared the chosen subtype with a long if/else statement (chosing the main dish) with several switch statements within it (chosing the subtypes). The code was very repetative. After realising I could declare the subtype variables with arrays and then simply selecting the subtype by chosing the array placement, it made the code a lot more dry.

In this challenge I also learned the prompt method to collect input data from the user and store it in a variable.

View it live

https://technigo-restaurant.netlify.app/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 91.2%
  • HTML 5.9%
  • CSS 2.9%