Skip to content

Commit 8cb8fe5

Browse files
author
Joseph Muller
committed
Updates to objects and DOM sessions
1 parent d08a36d commit 8cb8fe5

5 files changed

Lines changed: 35 additions & 1 deletion

File tree

lectures/objects-loops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If you learn best by reading, check out chapter 4 of _Eloquent JavaScript_.
3333

3434
[#29 How to use JS arrays](https://youtu.be/K97CmrUFyQY), 10m 49s, Dev Dreamer (Amit), YouTube, 21 Apr 2021.
3535

36-
[#30 How to use JS array methods](https://youtu.be/K97CmrUFyQY), 19m 08s, Dev Dreamer (Amit), YouTube, 30 Apr 2021.
36+
[#30 How to use JS array methods](https://youtu.be/0m3lBRVSTH8), 19m 08s, Dev Dreamer (Amit), YouTube, 30 Apr 2021.
3737

3838
[Data Structures: Objects and Arrays](https://eloquentjavascript.net/04_data.html), chapter from book _Eloquent JavaScript_, 3rd ed. (2018), Marijn Haverbeke
3939

public/sandbox/js/index.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
body {
2+
font-family: sans-serif;
3+
font-size: 1.2rem;
4+
color: #fdf3e3;
5+
background-color: #36565f;
6+
}
7+
8+
h1,
9+
h2 {
10+
font-family: monospace;
11+
}
12+
13+
.container {
14+
max-width: 48rem;
15+
margin: 10vh auto;
16+
}

public/sandbox/js/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en-GB">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>JS</title>
6+
<link rel="stylesheet" href="index.css">
7+
<script defer src="index.js"></script>
8+
</head>
9+
<body>
10+
<div class="container">
11+
<p><em>Open the browser console to see the JS program output!</em></p>
12+
</div>
13+
</body>
14+
</html>

public/sandbox/js/index.js

Whitespace-only changes.

workshops/dom/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ create a webpage that displays information of your choosing.
99

1010
2. Explore the data contained in `eurovisionContestants.js` to see what information you have to work with.
1111

12+
::: tip HINT
13+
There is a **lot** of data in that array, which means the program might run slowly when you are just getting started. To make it more manageable temporarily, you can shorten the array with the `slice` method.
14+
:::
15+
1216
3. Write a JavaScript program in `app.js` that uses the data imported in
1317
`contestants` to populate the webpage `index.html`.
1418

0 commit comments

Comments
 (0)