-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfavouriteFoods.html
42 lines (37 loc) · 1.22 KB
/
favouriteFoods.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Favourite Foods</title>
</head>
<body>
<div id="wrapper">
<section id="meals"></section>
</div>
<script>
/*
1. Edit the faveFoods object so that it contains
your favorite foods.
2. Destructure the faveFoods object into three consts:
breakfast, lunch, and supper.
3. Fetch the meals <section> from the DOM.
4. Set the innerHTML content of the meals <section> to a paragraph
that states what your favorite foods are for breakfast, lunch, and supper.
Use a template literal to construct the string.
E.g.
For breakfast, I only like croissants 🥐. For lunch, I love pasta 🍝,
and for supper I want usually want pizza 🍕.
*/
const faveFoods = {
breakfast: 'poha',
lunch: 'roti',
supper: 'salad'
}
const { breakfast, lunch, supper } = faveFoods
const mealsSection = document.querySelector("#meals")
mealsSection.innerHTML = `<p>For breakfast, I only like ${breakfast} 🥐. For lunch, I love ${lunch} 🍝, and for supper I want usually want ${supper} 🍕.</p>`
</script>
</body>
</html>