-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
71 lines (69 loc) · 1.79 KB
/
index.html
File metadata and controls
71 lines (69 loc) · 1.79 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<div id="root"></div>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script
src="https://unpkg.com/react@16/umd/react.development.js"
crossorigin
></script>
<script
src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"
crossorigin
></script>
<script type="text/babel">
let students = [
{
firstName: "Omar",
lastName: "Benseddik",
favoriteEmoji: "🐔",
},
{
firstName: "Seif",
lastName: "Ghezala",
favoriteEmoji: "👑",
},
{
firstName: "Amir",
lastName: "Ghezala",
favoriteEmoji: "🦅",
},
{
firstName: "Mamoun",
lastName: "Taharraoui",
favoriteEmoji: "🐲"
}
];
function App() {
return (
<div className="app">
<table>
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Favorite Emoji</th>
</tr>
</thead>
<tbody>
{students.map((student, idx) => (
<tr key={idx}>
<td>{students[idx].firstName}</td>
<td>{students[idx].lastName}</td>
<td>{students[idx].favoriteEmoji}</td>
</tr>
))}
</tbody>
</table>
</div>
);
}
ReactDOM.render(<App />, document.getElementById("root"));
</script>
</body>
</html>