diff --git a/courses/foundation/intro-to-javascript/week1/session-plan.md b/courses/foundation/intro-to-javascript/week1/session-plan.md index 59f27076..e3fd9dff 100644 --- a/courses/foundation/intro-to-javascript/week1/session-plan.md +++ b/courses/foundation/intro-to-javascript/week1/session-plan.md @@ -216,6 +216,7 @@ const pizzaPriceDiscounted = pizzaprice - 10; const users = ["peter", "Johnny", "Børge"]; const lastUser = users[3]; +console.log(lastUser); ``` ### Pizza project @@ -227,23 +228,24 @@ const lastUser = users[3]; 3. Also inside the folder create a new JavaScript file called "pizza.js" 4. Remember to Include the pizza.js script in the html file 5. Write a log statement, so you know that your javascript code is running: + `console.log("I love pizza");` + 6. Create a variable to store the name of your favourite pizza 7. Create a variable to store the price of the pizza 8. Now log a statement to the console that will show the chef the entire pizza order in a language they understand, e.g. like this: + `New pizza order: . The price of the pizza is: ` #### Part 2 -Now we will modify the program so that you can order multiple pizzas and also decide if the pizzas should be family size +Now we will modify the program so you can order multiple pizzas and decide whether the order is takeaway. 1. Create a new variable to store the amount of pizzas you would like to order +2. Create a new variable to store whether or not the order is for takeaway +3. Now write a formula to calculate the total price of your pizza order, and save it in a variable called totalPrice +4. Modify the log statement for the chef so it includes whether or not the order is for takeaway, and now show the total price of the order: -2. Create a new variable to store whether or not you would to order a family size pizza. - -3. Now write a formula to calculate the total price of your pizza order, and save it in a variable called totalPrice (if the pizza is family size the prize of the pizza is doubled. - -4. Modify the log statement for the chef so it includes whether or not the pizza is family size, and now show the total price of the order - `New pizza order: . Total cost for the order is: ` + `New pizza order (takeaway: ): . Total cost for the order is: ` -5. Try to change the price of the pizza and if the pizza should be family size, and then check if the total price is calculated correctly. +5. Try to change the price of the pizza and then check if the total price is calculated correctly