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/MAKEME.md
+3-9Lines changed: 3 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -5,21 +5,15 @@ Topics discussed in class this week:
5
5
• Git
6
6
```
7
7
8
-
>[Here](/Week2/README.md) you find the readings you have to complete before the second lecture.
8
+
>[Here](/Week2/README.md) you find the readings you have to complete before the second lecture.
9
9
10
10
## Step 1: Share a useful resource
11
11
12
12
_Deadline Monday_
13
13
14
14
All share a video or a resource (this can be a drawing, an article or a podcast) that was helpful for you the last few weeks with learning HTML/CSS. Please share this in the channel of your class in Slack. Also write as small note about what the resource is about and why you think it's so helpful (you can share more than one if you like).
15
15
16
-
## Step 2: Feedback
17
-
18
-
_Deadline Monday_
19
-
20
-
Give feedback on a fellow student on their last HTML/CSS assignment via trello. Make sure to give constructive feedback where you make clear what the person did well, and what parts they can improve of their code / what parts of the website are missing.
21
-
22
-
## Step 3: Git homework
16
+
## Step 2: Git homework
23
17
24
18
_Deadline Wednesday_
25
19
@@ -40,4 +34,4 @@ Pair up with another student in your class. The homework requires two people to
40
34
41
35
Note:
42
36
43
-
The *user* is *not supposed to fork* the admin’s repository. *admin* is supposed to add user as a collaborator and *user* should just *clone* the repository (i.e. *user* will only have the local copy of the repository). Only *admin* will have the *github* server copy of the repository. Of course, admin will have its local copy of the repository too.
37
+
The _user_ is _not supposed to fork_ the admin’s repository. _admin_ is supposed to add user as a collaborator and _user_ should just _clone_ the repository (i.e. _user_ will only have the local copy of the repository). Only _admin_ will have the _github_ server copy of the repository. Of course, admin will have its local copy of the repository too.
Copy file name to clipboardExpand all lines: Week2/MAKEME.md
+43-47Lines changed: 43 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -8,26 +8,19 @@ Topics discussed in class this week:
8
8
• Operators
9
9
```
10
10
11
-
>[Here](/Week3/README.md) you find the readings you have to complete before the third lecture.
11
+
>[Here](/Week3/README.md) you find the readings you have to complete before the third lecture.
12
12
13
13
## Before you start with the homework:
14
14
15
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
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
-
<br>**1. Programming Basics**
20
-
<br>**2. Core Programming Syntax**
21
-
<br>**3. Variables and Data Types**
18
+
<br>**0. Introduction**
19
+
<br>**1. Programming Basics**
20
+
<br>**2. Core Programming Syntax**
21
+
<br>**3. Variables and Data Types**
22
22
23
-
24
-
## Step 2: Feedback
25
-
26
-
_Deadline Wednesday_
27
-
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
-
30
-
## Step 3: JavaScript
23
+
## Step 2: JavaScript
31
24
32
25
_Deadline Thursday_
33
26
@@ -53,42 +46,42 @@ Copy the code in your `.js` file and run it. You will see that you will get a Sy
53
46
54
47
3\. Declare a variable `x` and initialize it with an integer, using these exact steps:
55
48
3\.1 First, _declare_ your variable `x` (do not initialize it yet).
56
-
3\.2 Add a `console.log` statement that explains in words what _you think_ the value of `x` is, like in this example:
49
+
3\.2 Add a `console.log` statement that explains in words what _you think_ the value of `x` is, like in this example:
57
50
58
51
```js
59
-
// TODO -> here you initialize your variable
60
-
console.log('the value of my variable x will be: whateverYouThinkItWillLog');
52
+
// TODO -> here you initialize your variable
53
+
console.log("the value of my variable x will be: whateverYouThinkItWillLog");
61
54
```
62
55
63
56
3\.3 Add a `console.log` statement that logs the value of `x`.
64
57
3\.4 Now _initialize_ your variable `x` with an integer.
65
58
3\.5 Next, add a `console.log` statement that explains what _you think_ the value of `x` is.
66
59
3\.6 Add a `console.log` statement that logs the value of `x`.
67
-
Steps to be taken:
60
+
Steps to be taken:
68
61
69
62
```js
70
-
// TODO -> here you declare your variable
71
-
console.log('the value of x will be: whateverYouThinkItWillLog');
72
-
// TODO -> log the actual value of x
73
-
// TODO -> here you initialize your variable
74
-
console.log('the value of x will be: whateverYouThinkItWillLog');
75
-
// TODO -> log value of x again
63
+
// TODO -> here you declare your variable
64
+
console.log("the value of x will be: whateverYouThinkItWillLog");
65
+
// TODO -> log the actual value of x
66
+
// TODO -> here you initialize your variable
67
+
console.log("the value of x will be: whateverYouThinkItWillLog");
68
+
// TODO -> log value of x again
76
69
```
77
70
78
71
4\. Declare a variable `y` and assign a string to it.
79
72
4\.1 Write a `console.log` statement in which you explain in words what _you think_ the value of the string is.
80
73
4\.2 Now `console.log` the variable `y`.
81
74
4\.3 Now assign a new string to the variable `y`.
82
75
4\.4 Just like what you did before write a `console.log` statement that explains in words what you think will be logged to the console.
83
-
4\.5 Now console.log `y` again.
76
+
4\.5 Now console.log `y` again.
84
77
85
78
```js
86
-
// TODO -> here you declare AND assign your string
87
-
console.log('the value of my string will be: whateverYouThinkItWillLog');
88
-
// TODO -> log the actual value of the string to the console
89
-
// TODO -> assign a new value to your variable x
90
-
console.log('the value of my string will be: whateverYouThinkItWillLog');
91
-
// TODO -> log the actual value of the string to the console
79
+
// TODO -> here you declare AND assign your string
80
+
console.log("the value of my string will be: whateverYouThinkItWillLog");
81
+
// TODO -> log the actual value of the string to the console
82
+
// TODO -> assign a new value to your variable x
83
+
console.log("the value of my string will be: whateverYouThinkItWillLog");
84
+
// TODO -> log the actual value of the string to the console
92
85
```
93
86
94
87
5\. How do you round the number 7.25, to the nearest integer (i.e., whole number)?
@@ -97,37 +90,38 @@ Copy the code in your `.js` file and run it. You will see that you will get a Sy
97
90
5\.3 Declare another variable `a` that has the value of `z` but rounded to the nearest integer.
98
91
5\.4 `console.log` `a`.
99
92
5\.5 So now we have `z` and `a` find a way to compare the two values and store the highest of the two in a new variable.
100
-
5\.6 `console.log` the highest value.
93
+
5\.6 `console.log` the highest value.
101
94
102
-
6\.*Arrays*
95
+
6\._Arrays_
103
96
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](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/naming_conventions.md)).
104
97
6\.2 Write a `console.log` statement that explains in words what you think the value of the array is.
105
98
6\.3 `console.log` your array.
106
99
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).
107
100
6\.5 Log your array.
108
-
6\.6 Add a statement that adds Daan's favorite animal ('baby pig') to the *existing array*.
109
-
6\.7 Log your newarray!
101
+
6\.6 Add a statement that adds Daan's favorite animal ('baby pig') to the _existing array_.
102
+
6\.7 Log your newarray!
110
103
111
-
7\. *More strings*
104
+
7\. _More strings_
112
105
Let's consider the following string: `let myString = "this is a test"`.
113
106
7\.1 Add the string to your file and console.log it.
114
107
7\.2 Find a way to get the length of `myString`.
115
-
7\.3 `console.log` the length of `myString`.
108
+
7\.3 `console.log` the length of `myString`.
116
109
117
110
8\. Write a program that checks the types of two variables and prints out `SAME TYPE` if they are the same type.
118
111
8\.1 First declare at least four variables and assign them different data types.
119
112
8\.2 For each variable write a `console.log` statement that logs the value
120
-
```js
121
-
let foo = 3;
122
-
console.log('The value of my variable foo is:' + foo);
123
-
```
124
113
125
-
(Curious to know what a `foo` is? Check [this article](https://en.wikipedia.org/wiki/Metasyntactic_variable) on Wikipedia.)
114
+
```js
115
+
let foo = 3;
116
+
console.log("The value of my variable foo is: " + foo);
117
+
```
118
+
119
+
(Curious to know what a `foo` is? Check [this article](https://en.wikipedia.org/wiki/Metasyntactic_variable) on Wikipedia.)
126
120
127
121
8\.3 Now write a `console.log` statement wherein you first explain in words what you think the _type_ of your variables is.
128
122
8\.4 Now use `typeof` to log the actual _type_ of your variables.
129
123
8\.5 Now compare the types of your different variables with one another.
130
-
8\.6 Make sure to also show a message when the variables you are comparing are not the same type.
124
+
8\.6 Make sure to also show a message when the variables you are comparing are not the same type.
131
125
132
126
For example:
133
127
@@ -142,26 +136,27 @@ if (...) {
142
136
```
143
137
144
138
9\. If `x` equals 7, and the only other statement is `x = x %3`, what would be the new value of `x`?
145
-
9\.1 Add at least 3 `console.log` statements in which you show that you understand what `%` does.
139
+
9\.1 Add at least 3 `console.log` statements in which you show that you understand what `%` does.
146
140
147
141
10\. Write a program to answer the following questions:
148
142
10\.1 Can you store multiple types in an array? Numbers and strings? Make an example that illustrates your answer.
149
143
10\.2 Can you compare infinities? (Not in Eyad's world) - does 6/0 === 10/0? How can you test this?
150
-
10\.3 Add `console.log` statements to the above program in which you show that you understand the concepts (just like you've done in the above assignments).
144
+
10\.3 Add `console.log` statements to the above program in which you show that you understand the concepts (just like you've done in the above assignments).
On freeCodeCamp.com please do the [Basic JavaScript](https://www.freecodecamp.com/challenges/learn-how-free-code-camp-works) exercises up and until the __"Shopping List"__ exercise (there are some topics we did not cover but you can do it).
150
+
On freeCodeCamp.com please do the [Basic JavaScript](https://www.freecodecamp.com/challenges/learn-how-free-code-camp-works) exercises up and until the **"Shopping List"** exercise (there are some topics we did not cover but you can do it).
157
151
158
-
## Step 5: Read before next lecture
152
+
## Step 4: Read before next lecture
159
153
160
154
_Deadline Sunday morning_
161
155
162
156
Go trough the reading material in the [README.md](/Week3/README.md) to prepare for your next class
163
157
164
158
### How to hand in Homework:
159
+
165
160
```
166
161
• Create a newrepository"hyf-javascript1". Also create a newfolder"week1" inside this repository.
167
162
• Upload your homework files inside the week1 folder and write a description forthis “commit”.
@@ -170,6 +165,7 @@ Go trough the reading material in the [README.md](/Week3/README.md) to prepare f
170
165
```
171
166
172
167
### Hint
168
+
173
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.
0 commit comments