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
|7.|• Object Oriented Programming <br>• Code flow (order of execution) <br>• Async vs Sync|[Reading Week 7](/Week7/README.md)|[Homework Week 7](/Week7/MAKEME.md)|
17
-
|8.|• Structure for a basic SPA <br>• [XMLHttpRequests](fundamentals/XMLHttpRequest.md) <br>• API calls|[Reading Week 8](/Week8/README.md)|[Homework Week 8](/Week8/MAKEME.md)|
17
+
|8.|• Structure for a basic SPA (Single Page Application) <br>• [XMLHttpRequests](fundamentals/XMLHttpRequest.md) <br>• API calls|[Reading Week 8](/Week8/README.md)|[Homework Week 8](/Week8/MAKEME.md)|
18
18
|9.|• (re)writing data structures (in JSON) <br>• [Promises](fundamentals/promises.md)|[Reading Week 9](/Week9/README.md)|[Homework Week 9](/Week9/MAKEME.md)|
Copy file name to clipboardExpand all lines: Week2/MAKEME.md
+31-21Lines changed: 31 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -3,29 +3,29 @@
3
3
```
4
4
Topics discussed in class this week:
5
5
• Intro JavaScript (What is it, where can you use it for)
6
-
• Variables [var, let, const]
7
-
• Basic Data types [Strings, Numbers, Arrays, Booleans]
6
+
• Variables (var, let, const)
7
+
• Basic Data types (strings, numbers, arrays, booleans)
8
8
• Operators
9
9
```
10
10
11
11
>[Here](/Week1/README.md) you find the readings you have to complete before the second lecture.
12
12
13
13
## Before you start with the homework:
14
14
15
-
1.Go through the review of [week 1](https://github.com/HackYourFuture/JavaScript/blob/master/Week1/REVIEW.md)
15
+
1.Review the [Git course material](https://github.com/HackYourFuture/Git) of last week.
16
16
2. Watch: [What is programming](https://www.khanacademy.org/computing/computer-programming/programming/intro-to-programming/v/programming-intro) Just watch the 2 min video, you do not have to do the entire JavaScript course (It could be useful later on though).
17
-
3. Please watch the following parts of the course, [Programming Foundations Fundamentals](https://www.lynda.com/Programming-Foundations-tutorials/Welcome/83603/90426-4.html) on Lynda.com (if you don't have access to Lynda yet ask Gijs):
18
-
<br>0. Introduction
19
-
1. Programming Basics
20
-
2. Core Programming Syntax
21
-
3. Variables and Data Types
17
+
3. Please watch the following parts of the course, [Programming Foundations Fundamentals](https://www.lynda.com/Programming-Foundations-tutorials/Welcome/83603/90426-4.html) on Lynda.com (if you don't have access to Lynda yet ask Gijs):
18
+
0\. Introduction
19
+
1\. Programming Basics
20
+
2\. Core Programming Syntax
21
+
3\. Variables and Data Types
22
22
23
23
24
24
## Step 2: Feedback
25
25
26
26
_Deadline Wednesday_
27
27
28
-
Provide feedback on the HTML-CSS assignments (week 3) of one of your fellow students. You will be assigned to one of the assignments by the class lead of this week.
28
+
Provide feedback on the Git assignments (week 1) of one of your fellow students. You will be assigned to one of the assignments by the class lead of this week.
29
29
30
30
## Step 3: JavaScript
31
31
@@ -42,22 +42,24 @@ Ciao, mondo! // Italian
42
42
Hola, mundo! // Spanish
43
43
```
44
44
45
-
2\. Consider the following code:
45
+
2\. Consider the following code:
46
+
46
47
```
47
48
console.log('I'm awesome');
48
49
```
49
-
2\.1 Copy the code in your `.js` file and run it. You will see that you will get a SyntaxError. Find a solution for this error, Hint read the error message carefully, it also gives an indication of where the problem is.
50
50
51
-
3\. Declare a variable `x` and initialize it with an integer.
52
-
3\.1 First, _declare_ your variable `x`.
51
+
Copy the code in your `.js` file and run it. You will see that you will get a SyntaxError. Find a solution for this error. Hint: read the error message carefully, it also gives an indication of where the problem is.
52
+
53
+
3\. Declare a variable `x` and initialize it with an integer, using these exact steps:
54
+
3\.1 First, _declare_ your variable `x` (do not initialize it yet).
53
55
3\.2 Add a console.log statement that explains that explains in words what _you think_ the value of `x` is, like in this example:
54
56
```js
55
57
// TODO -> here you initialize your variable
56
58
console.log('the value of my variable x will be: whateverYouThinkItWillLog');
57
59
```
58
60
3\.3 Add a console.log statement that logs the value of `x`.
59
61
3\.4 Now _initialize_ your variable `x` with an integer.
60
-
3\.5 Now add a console.log statement that explains what _you think_ the value of `x` is.
62
+
3\.5 Next, add a console.log statement that explains what _you think_ the value of `x` is.
61
63
3\.6 Add a console.log statement that logs the value of `x`.
62
64
Steps to be taken:
63
65
@@ -85,7 +87,7 @@ console.log('I'm awesome');
85
87
// TODO -> log the actual value of the string to the console
86
88
```
87
89
88
-
5\. How do you round the number 7.25, to the nearest integer?
90
+
5\. How do you round the number 7.25, to the nearest integer (i.e., whole number)?
89
91
5\.1 Declare a variable `z` and assign the number 7.25 to it.
90
92
5\.2 Console.log `z`.
91
93
5\.3 Declare another variable `a` that has the value of z but rounded to the nearest integer.
@@ -94,16 +96,16 @@ console.log('I'm awesome');
94
96
5\.6 Console.log the highest value.
95
97
96
98
6\.*Arrays!*
97
-
6\.1 Declare an empty array.
99
+
6\.1 Declare an empty array. Make sure that the name you choose indicates 'plurality', because an array is capable of containing more than one element. (See [Naming conventions](../fundamentals/naming_conventions.md).)
98
100
6\.2 Write a console.log statement that explains in words what you think the value of the array is.
99
101
6\.3 Console.log your array.
100
-
6\.4 Create an array that has your favorite animals inside (you can decide on how to call it yourself, but read on a bit here and see if you can find a good name that exactly describes what this variable will hold).
102
+
6\.4 Create an array that has your favorite animals inside (see if you can find a good name that exactly describes what this variable will hold).
101
103
6\.5 Log your array.
102
-
6\.6 Add a statement that adds Daan's favorite animal (baby pig) to the *existing array*.
104
+
6\.6 Add a statement that adds Daan's favorite animal ('baby pig') to the *existing array*.
103
105
6\.7 Log your new array!
104
106
105
107
7\.*More strings*
106
-
7\.1 Let's consider the following string: `let myString = "this,is,a,test"`.
108
+
7\.1 Let's consider the following string: `let myString = "this is a test"`.
107
109
7\.2 Add the string to your file and console.log it.
108
110
7\.3 Find a way to get the length of `myString`.
109
111
7\.4 Console.log the length of `myString`.
@@ -115,6 +117,9 @@ console.log('I'm awesome');
115
117
let foo =3;
116
118
console.log('The value of my variable foo is: '+ foo);
117
119
```
120
+
121
+
(Curious to know what a `foo` is? Check [this article](https://en.wikipedia.org/wiki/Metasyntactic_variable) on WikiPedia.)
122
+
118
123
8\.3 Now write a console.log statement wherein you first explain in words what you think the _type_ of your variables is.
119
124
8\.4 Now use `typeof` to log the actual _type_ of your variables.
120
125
8\.5 Now compare the types of your different variables with one another.
@@ -126,7 +131,7 @@ For example:
126
131
let x =9;
127
132
let y ='Hello';
128
133
129
-
if () {
134
+
if (...) {
130
135
console.log('SAME TYPE');
131
136
}
132
137
// TODO -> add a way of giving feedback if your variables don't have the same type
@@ -163,4 +168,9 @@ Go trough the reading material in the [README.md](/Week1/README.md) to prepare f
163
168
### Hint
164
169
If you solve the FreeCodeCamp challenges and they are new concepts to you and you would like to take a look at them later on in the program, Copy your answers from FCC in a `.js` file and upload them to Github in a repository for future reference. In this way you build your own little documentation, if you look back at them first try to understand what it does before you run them.
165
170
166
-
:star: Additional resources and review: [here](/Week1/REVIEW.md):star:
0 commit comments