diff --git a/index.html b/index.html index c34c9d8..e4122f9 100644 --- a/index.html +++ b/index.html @@ -15,14 +15,16 @@

Random Generators Website

- +
- - + +
+ +
diff --git a/pizzaToppings.html b/pizzaToppings.html new file mode 100644 index 0000000..8065d6f --- /dev/null +++ b/pizzaToppings.html @@ -0,0 +1,27 @@ + + + + + + + Random Pizza Toppings + + + + + + + +
+

Random Pizza Toppings

+
__________________________
+ +
+ + +
+ + + + + \ No newline at end of file diff --git a/script.js b/script.js index 827dadf..4abcc1e 100644 --- a/script.js +++ b/script.js @@ -64,4 +64,13 @@ function dadjokes(){ const display = document.getElementById('result'); display.textContent = `${computerChoice}`; +} + +function pizzaToppings(){ + const list = ["Pepperoni","Onions", "Ham", "Mushrooms" ,"Sausage" ,"Pineapple", "Supreme (Bacon, Onion, beef mince, capsicum(bell peppers), pepperoni, mushroom, andolive)", "Hawaiian (Ham and Pineapple)", "BBQ Meatlovers (pepperoni, bacon, cabanossi, beef mince, ham)", "Garlic Butter Prawns and Chilli (garlic butter prawns, capsicum, onion, chili, rocket)", "Sausage and Kale","Hot n’ spicy(spicy salami, capsicum, sliced jalapenos, onions, hot sauce)", "Aussie pizza (bacon, red onion, a whole egg cracked on)", "Caramelized onion, feta, beef mince", "Squid, chorizo, rocket","Spring pizza (zucchini, artichoke, asparagus, spinach, and pesto dolloped on just before serving)","Seafood pizza (precooked squid, mussels, clams, prawns etc)","BBQ chicken (BBQ sauce, shredded chicken, red onion, smoked paprika)"]; + const computerChoice = list[Math.floor(Math.random() * list.length)]; + + const display = document.getElementById('result'); + + display.textContent = `${computerChoice}`; } \ No newline at end of file