forked from adamszaruga/rendering
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrenderRestaurants.js
More file actions
35 lines (30 loc) · 853 Bytes
/
renderRestaurants.js
File metadata and controls
35 lines (30 loc) · 853 Bytes
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
function renderRestaurants(restaurants) {
// HINT: You can use <img /> tags that point to these playing card images:
// https://commons.wikimedia.org/wiki/Category:SVG_playing_cards
return `
<div class="text-center mt-5">
<code>${JSON.stringify(restaurants)}</code>
</div>
`
}
function restaurants() {
var content = document.getElementById('content');
var restaurantsAbstraction = [
{
name: "McDonald's",
type: "Fast Food",
priceRating: 1
},
{
name: "Gunshow",
type: "Date Night Dining",
priceRating: 5
},
{
name: "Iron Age",
type: "Korean BBQ",
priceRating: 4
},
];
content.innerHTML = renderRestaurants(restaurantsAbstraction);
}