You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Week1/README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ The Document-Object Model (DOM) is a tree-like representation of the structure o
78
78
79
79

80
80
81
-
JavaScript is made accessible to the DOM by embedding it into an HTML file. You might've seen the <script></script> before; well, this is how the browser becomes aware of JavaScript.
81
+
JavaScript is made accessible to the DOM by embedding it into an HTML file. You might've seen the `<script></script>` before; well, this is how the browser becomes aware of JavaScript.
82
82
83
83
-[What exactly is the DOM](https://bitsofco.de/what-exactly-is-the-dom/)
84
84
-[JavaScript and the browser](https://eloquentjavascript.net/13_browser.html)
In this example we're executing the following steps:
112
112
113
113
1. We're first selecting the body: this is always necessary, as we can only add or remove elements from the body of the document
114
-
2. Secondly, we're creating a new DOM element: a <p> element
114
+
2. Secondly, we're creating a new DOM element: a `<p>` element
115
115
3. Thirdly, we're injecting content into the element
116
116
4. Fourthly, we give our element a background color
117
-
5. Finally, we add the <p> element in the body
117
+
5. Finally, we add the `<p>` element in the body
118
118
119
-
Test this code out by copying and pasting it in the Developer Console of your browser. After you've pressed the Enter/Return key you will find your new <p> at the end of the page!
119
+
Test this code out by copying and pasting it in the Developer Console of your browser. After you've pressed the Enter/Return key you will find your new `<p>` at the end of the page!
120
120
121
121
Learning how to write JavaScript that targets the DOM is an essential part of being a web developer. In the following resources you'll more about how to do that:
Test this code out by copying and pasting it in the Developer Console of your browser. After you've pressed the Enter/Return click the website. You should see the whole <body> becoming black!
151
+
Test this code out by copying and pasting it in the Developer Console of your browser. After you've pressed the Enter/Return click the website. You should see the whole `<body>` becoming black!
152
152
153
153
This is DOM manipulation in its simplest form. It goes in three essential steps:
Copy file name to clipboardExpand all lines: test/README.md
+21-17Lines changed: 21 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# JavaScript1 and JavaScript2 Test
2
2
3
-
You’ll be doing a comprehension test on paper. It will be about the most important JavaScript concepts you’ve learned about so far (JavaScript1 and JavaScript2).
3
+
You’ll be doing a comprehension test **on paper**. It will be about the most important JavaScript concepts you’ve learned about so far (JavaScript1 and JavaScript2).
4
4
5
5
## Practical information
6
6
- The test will start at **10.30 until 11.30**. The door will open at 10.15. **Be on time!**
@@ -15,33 +15,37 @@ Like the homework you will get feedback and are expected to improve upon your we
15
15
16
16
## Test material
17
17
These are the most important concepts that will be tested:
18
-
- Variables
19
-
- Data types (strings, numbers, arrays, objects, booleans)
20
-
- Conditional statements (if/switch statement)
21
-
- Loops
22
-
-Regular and arrow functions
23
-
- How to use JavaScript to do basic DOM manipulations (add, modify and remove DOM elements)
- How to use JavaScript to do basic `DOM manipulations` (add, modify and remove DOM elements)
24
+
-`Code commenting`
25
+
-`Array functions` (`map` and `filter`)
26
+
-`Callbacks`
27
27
28
28
## Preparation
29
29
Advice on how to optimally prepare:
30
30
- Find out 2 things about each concepts listed above: (1) how does the basic structure look and (2) what is the most common use case.
31
+
31
32
- Ask questions through Slack to your teachers and/or your classmates
32
-
- Practice coding WITHOUT Google and on paper.
33
-
this is very important because the test will be on paper. You can practise this by making your old homework again; but than on paper. Make sure that you can write down functions and loops without syntax errors.
33
+
34
+
- Practice coding WITHOUT Google and on paper. This is very important because the test will be on paper. You can practise this by making your old homework again; but than on paper. Make sure that you can write down functions and loops without syntax errors.
35
+
34
36
- Practice for understanding (why something is the case), NOT just for repetition’s sake (and hoping ‘you will understand it one day’).
37
+
35
38
- Make a summary of all the study material.
39
+
36
40
- After you prepared try to make the sample questions that are in this file.
37
41
38
42
## During the test
39
43
Advise on how to make a test:
40
-
- Look for low hanging fruit. Which of the assignments is easiest for you to do? Tackle that one first.
41
-
- Make sure that all syntax is correct when writing code on paper. For instance: don’t forget brackets or semicolons.
42
-
- If you get stuck in an assignment, move on to the next one. You can always come back later if time permits.
43
-
- After finishing an assignment, read the question again to make sure you actually gave an answer to the question.
44
-
- Before handing in the test, read it all over again to pick out the small mistakes.
44
+
-**Look for low hanging fruit**. Which of the assignments is easiest for you to do? Tackle that one first.
45
+
- Make sure that all **syntax is correct** when writing code on paper. For instance: don’t forget brackets or semicolons.
46
+
-**If you get stuck in an assignment, move on to the next one**. You can always come back later if time permits.
47
+
- After finishing an assignment, read the question again to **make sure you actually gave an answer to the question**.
48
+
- Before handing in the test, read it all over again to pick out the small mistakes.**Double check your work!**
45
49
46
50
## Sample questions
47
51
1. Write and call a function that creates and appends a <p> tag to the <body> of an HTML file. Make use of the already predefined DOM methods createElement() and appendChild(). The innerText of the <p> should be “hello HackYourFuture!”.
0 commit comments