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: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,8 @@ Here you can find course content and homework for the JavaScript 1,2 and 3 modul
9
9
|0.|Preparation for your first JavaScript session|[Pre-reading](/Week0/README.md) + [CLI Reading Week 1](https://github.com/HackYourFuture/CommandLine/blob/master/Lecture-1.md)|-|-|
10
10
|1.|Git Session with Unmesh|[Reading Week 1](/Week1/README.md)|[Homework Week 1](/Week1/MAKEME.md)|[Review](/Week1/REVIEW.md)|
11
11
|2.|• Intro JavaScript (What is it, where can you use it for)<br>• Variables [var, let, const]<br>• Basic Data types [Strings, Numbers, Arrays, Booleans]<br>• Operators <br>• Naming conventions|[Reading Week 2](/Week2/README.md)|[Homework Week 2](/Week2/MAKEME.md)|[Review](/master/Week2/REVIEW.md)|
12
-
|3.|• Git work flow :smiling_imp:<br>• Advanced data types [Objects] <br>• Conditions <br>• Statements vs Expressions<br> • Loops (for/while)<br>• Functions |[Reading Week 2](/Week2/README.md)|[Homework Week 2](/Week2/MAKEME.md)|[Review](/Week2/REVIEW.md)|
13
-
|4.|• Capturing user input <br>• Basic DOM manipulations[img src, innerHTML] <br>• Code debugging using the browser <br>• Code commenting <br>• Structuring code files |[Reading Week 4](/Week4/README.md)|[JS](/Week4/MAKEME.md)|Review|
12
+
|3.|• Git work flow :smiling_imp:<br>• Advanced data types [Objects] <br>• Conditions <br>• Statements vs Expressions<br> • Loops (for/while)<br>• Functions |[Reading Week 3](/Week3/README.md)|[Homework Week 3](/Week3/MAKEME.md)|[Review](/Week3/REVIEW.md)|
13
+
|4.|• Capturing user input <br>• Basic DOM manipulations[img src, innerHTML] <br>• Code debugging using the browser <br>• Code commenting <br>• Structuring code files |[Reading Week 4](/Week4/README.md)|[Homework Week 4](/Week4/MAKEME.md)|Review|
Copy file name to clipboardExpand all lines: Week1/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ In week two we will discuss the following topics:
14
14
To test that it was installed and running properly, go to your terminal and run the command: node -v You should get the node version printed on your terminal, for example, v8.8.0
15
15
2. Although you are free to make you own choice of text/code editor to use during class and homework, we have good experiences with Microsoft's free VSCode editor, which is supported on Windows, Mac and Linux. Please refer to our [VSCode Tips](../VSCodeTips/README.md) for more information.
16
16
17
-
###Here are resources that we like you to read as a preparation for the coming lecture:
17
+
## Here are resources that we like you to read as a preparation for the coming lecture:
18
18
19
19
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):
20
20
@@ -31,7 +31,7 @@ Only watch the below chapters:
31
31
32
32
- Helpful resource: http://jsbooks.revolunet.com/ (here you can find tons of free JavaScript books online)
33
33
34
-
:star: You can also already go through the [review](https://github.com/HackYourFuture/JavaScript/blob/master/Week1/REVIEW.md) of the upcoming lecture.
34
+
:star: You can also already go through the [review](/Week2/REVIEW.md) of the upcoming lecture.:star:
35
35
36
36
_Please go through the material and come to class prepared!_
Copy file name to clipboardExpand all lines: Week2/MAKEME.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ console.log('I'm awesome');
93
93
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.
94
94
5\.6 Console.log the highest value.
95
95
96
-
6\. Arrays!
96
+
6\.*Arrays!*
97
97
6\.1 Declare an empty array (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).
98
98
6\.2 Write a console.log statement that explains in words what you think the value of the array is.
99
99
6\.3 Console.log your array.
@@ -102,7 +102,7 @@ console.log('I'm awesome');
102
102
6\.6 Add a statement that adds Daan's favorite animal (baby pig) to the *existing array*.
103
103
6\.7 Log your new array!
104
104
105
-
7\. More strings
105
+
7\.*More strings*
106
106
7\.1 Let's consider the following string: `let myString = "this,is,a,test"`.
107
107
7\.2 Add the string to your file and console.log it.
108
108
7\.3 Find a way to get the length of `myString`.
@@ -140,13 +140,13 @@ if () {
140
140
10\.2 Can you compare infinities? (Not in Eyad's world) - does 6/0 === 10/0? How can you test this?
141
141
10\.3 Add console.log statements to the above program's 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).
## From the book _A Smarter Way To Learn JavaScript_ please read:
24
28
- 'Loops' of [_A Smarter Way To Learn JavaScript_](https://github.com/Sharique-Hasan/SaylaniBatch2-JavaScript/blob/master/A%20Smarter%20Way%20to%20Learn%20JavaScript.pdf) : Chapters 18-20
25
29
- 'Functions' of [_A Smarter Way To Learn JavaScript_](https://github.com/Sharique-Hasan/SaylaniBatch2-JavaScript/blob/master/A%20Smarter%20Way%20to%20Learn%20JavaScript.pdf) : Chapters 35 - 38
Copy file name to clipboardExpand all lines: Week4/MAKEME.md
+1-10Lines changed: 1 addition & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -104,13 +104,6 @@ _Deadline Sunday morning_
104
104
105
105
And just for fun ... https://www.freecodecamp.com/challenges/sum-all-numbers-in-a-range
106
106
107
-
108
-
## Step 3: Some Challenges
109
-
110
-
_Deadline Saturday_
111
-
112
-
Let's practice working with Objects and Arrays. Go to FreeCodeCamp and complete all challenges under "Object Oriented and Functional Programming" and the _first four challenges_ under "Basic Algorithm Scripting", up until 'Find the longest word in a string.'
113
-
114
107
## Step 4: Read before next lecture
115
108
116
109
_Deadline Sunday morning_
@@ -131,9 +124,6 @@ Please note, there are various challenges all sorted on difficultly called KIU.
131
124
132
125
enjoy!
133
126
134
-
:star: Additional resources and review: [here](/Week3/REVIEW.md):star:
135
-
136
-
137
127
:octocat:
138
128
```
139
129
How to hand in your homework:
@@ -143,3 +133,4 @@ How to hand in your homework:
143
133
• Place the link to your repository folder in Trello.
144
134
```
145
135
136
+
:star: Additional resources and review: [here](/Week3/REVIEW.md):star:
Copy file name to clipboardExpand all lines: Week6/MAKEME.md
-28Lines changed: 0 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -103,34 +103,6 @@ console.log(y);
103
103
If you are confused please run the code and then consult the Google for "javaScript pass by value pass by reference"
104
104
105
105
106
-
<!-- Write assignment with more fun API -->
107
-
108
-
## Step 4: Some more JavaScript
109
-
110
-
_Deadline Saturday_
111
-
112
-
Make a website that fetches (= to get) data asynchronously.
113
-
114
-
1) Create a new website with external js file
115
-
116
-
2) Add a button (e.g. 'click me') that when clicked `console.logs` 'you clicked me!'
117
-
118
-
3) Create a function that fetches from [The Github API](https://developer.github.com/v3/). For example from [this page] (https://api.github.com/orgs/HackYourFuture/repos) (the one we used last week). For help on this check this [SO post](https://stackoverflow.com/questions/247483/http-get-request-in-javascript)
119
-
120
-
4) Display the data that you get from the Github API on your web page.
121
-
122
-
5) Now link the two together: When you click the button -> get the data from the Github API and display it on your website
123
-
124
-
6) Make all the repositories link their own page in Github. Use the value of the key: `name` to make this work (hint: Github urls always look like this https://api.github.com/repos/HackYourFuture/[repositoryName] where [repositoryName] would be replaced by the actual `name` of the repository, for example `CommandLine`). Make sure the link opens in a new tab.
You can see `CommandLine` in the URL. These are called "query parameters" and let us specify in detail what we want from the API. Play around with this. For example you can make two buttons that either get data for a specific repository, JavaScript or Node.js. Or go even more crazy and make users type in a search box 'JavaScript' and then send that to the API by changing the repository.
133
-
134
106
__Bonus__: Write a function takes this array `['a', 'b', 'c', 'd', 'a', 'e', 'f', 'c']` and returns an array which only has unique values in it (so it removes the duplicate ones). Make it a 'smart' algorithm that could do it for every array (only strings/number). Try to make it as fast as possible!
Copy file name to clipboardExpand all lines: Week7/MAKEME.md
+14-64Lines changed: 14 additions & 64 deletions
Original file line number
Diff line number
Diff line change
@@ -9,118 +9,68 @@ Topics discussed this week:
9
9
10
10
>[Here](/Week7/README.md) you find the readings you have to complete before the eighth lecture.
11
11
12
-
13
-
14
-
15
12
## Step 1: Give feedback on Step 3 and 4 of last weeks homework.
16
13
17
14
_Deadline Monday_
18
15
19
16
Give feedback on the SPA (Github API) and git branching homework of one of you fellow students. Please provide the feedback in an issue.
20
17
21
-
## Step 2: Git Homework
22
-
23
-
[Make these assignments](https://github.com/HackYourFuture/Git/blob/master/Lecture-3.md). For handing in homework follow the Forking workflow that is described in our lecture-3.md file of HackYourFuture’s Git repository (there is also a video that explains this).
24
-
25
18
## Step 3: Issues
26
-
=======
27
-
```
28
-
Topics discussed this week:
29
-
• Object Oriented Programming
30
-
• Code flow (order of execution)
31
-
• Async VS Sync
32
-
```
33
-
34
-
>[Here](/Week7/README.md) you find the readings you have to complete before the eighth lecture.
35
-
36
-
## Step 1: Give feedback on Step 3 and 4 of last weeks homework.
37
-
38
-
Give feedback on the SPA (Github API) and git branching homework of one of you fellow students. Please provide the feedback in an issue.
39
-
40
-
## Step 2: Issues
41
-
>>>>>>> planningClass12
42
19
43
20
- Solve all your Git issues. DO NO CLOSE AN ISSUE WITHOUT AN EXPLANATION OR CODE COMMIT REFERENCING THAT ISSUE.
44
21
45
22
46
-
###Step 3: Fix issues and API
23
+
## Step 3: Fix issues and API
47
24
48
25
- Fix the issues from the last week and make sure you explain how you fixed the issue in a comment (or commit message)
49
26
27
+
## Step 3: Some Challenges
28
+
29
+
_Deadline Saturday_
30
+
31
+
Let's practice working with Objects and Arrays. Go to FreeCodeCamp and complete all challenges under "Object Oriented and Functional Programming" and the _first four challenges_ under "Basic Algorithm Scripting", up until 'Find the longest word in a string.'
50
32
51
-
### Step 4: SPA :sweat_drops:
52
-
You are going to write a SPA (Single Page Application) that uses the [Github API](https://developer.github.com/guides/getting-started/). Make sure that your app uses a logical pattern just like [this codepen](http://codepen.io/Razpudding/pen/MmVpeW).
33
+
## Step 4: Some more JavaScript
53
34
54
-
Just like last week:
35
+
_Deadline Saturday_
55
36
56
37
Make a website that fetches (= to get) data asynchronously.
57
38
58
39
1) Create a new website with external js file
59
40
60
41
2) Add a button (e.g. 'click me') that when clicked `console.logs` 'you clicked me!'
61
42
62
-
3) Create a function that fetches from [The Github API](https://developer.github.com/v3/). For example from [this page] (https://api.github.com/orgs/HackYourFuture/repos). For help on this check this [SO post](https://stackoverflow.com/questions/247483/http-get-request-in-javascript)
43
+
3) Create a function that fetches from [The Github API](https://developer.github.com/v3/). For example from [this page] (https://api.github.com/orgs/HackYourFuture/repos) (the one we used last week). For help on this check this [SO post](https://stackoverflow.com/questions/247483/http-get-request-in-javascript)
63
44
64
45
4) Display the data that you get from the Github API on your web page.
65
46
66
47
5) Now link the two together: When you click the button -> get the data from the Github API and display it on your website
67
48
68
-
Cool we are back where we left of.
49
+
6) Make all the repositories link their own page in Github. Use the value of the key: `name` to make this work (hint: Github urls always look like this https://api.github.com/repos/HackYourFuture/[repositoryName]where [repositoryName] would be replaced by the actual `name` of the repository, for example `CommandLine`). Make sure the link opens in a new tab.
7) Make a function which takes a single argument. The function should make an XHR request to `https://api.github.com/repos/HackYourFuture/[SearchTerm]` where the search term will be the argument. This argument will be the input the user has given you, so make sure that when the user clicks the button you call this function with the argument.
77
-
78
-
8) Make all the repositories link their own page in Github. Use the value of the key: `name` to make this work (hint: Github urls always look like this https://api.github.com/repos/HackYourFuture/[repositoryName] where [repositoryName] would be replaced by the actual `name` of the repository, for example `CommandLine`). Make sure the link opens in a new tab.
79
-
80
-
- Make sure you handle user input well. That means you need to think about empty input, and input that doesn't yield any results.
81
-
82
-
So Github has this really nice documentation :octocat: :
9) Extend your page with an input element. This is so the user will be able to type in text.
57
+
You can see `CommandLine` in the URL. These are called "query parameters" and let us specify in detail what we want from the API. Play around with this. For example you can make two buttons that either get data for a specific repository, JavaScript or Node.js. Or go even more crazy and make users type in a search box 'JavaScript' and then send that to the API by changing the repository.
88
58
89
-
10) For each repository, show (in the right column) who the contributers are. You will need to use the `contributors_url` for this.
90
59
91
-
!Important
92
-
- Do not duplicate code! This is especially important for making requests since we are making multiple ones with different urls and we want to do different actions based on the call we are making. Here are some handles to get you started:
93
-
- So write a function called `makeRequest` which accepts (at least) the following parameters: `url` and `callback`.
94
-
- Make sure your `callback` is called when the request errors or when it sends a response (look at the documentation)
95
-
- Your `callback` functions should accept two parameters so it can handle both errors: `err` and `response`.
96
-
So based on your users actions (input, hovering, clicking) you want to call `makeRequest` with a different `url` and supply it with a function that handles both errors (display an error message to the user for example) and responses (render it correctly, as described below).
97
-
- Make your functions small and reusable (modular)! That means create separate functions to handle certain steps.
98
-
99
-
11) GO WILD
100
-
101
-
Again, check out the Github API documentation to see what kind of magic stuff you can do with it.
102
-
103
-
The assignment is to implement something extra that is not in the assignment :scream: (nice and vague right?)
104
-
105
-
So for example, we have teams in our organization. You can find out who are in there and make a call to 'https://api.github.com/users/' + userInput (where userInput is a string typed into a search field by a user). You can show the users name, avatar image (not the link to the image!) and the number of public repos they have. Or you could make an API call to 'https://api.github.com/users/user/repos' to find out the public repo's they have. Or you can show how many people starred a specific repository.
106
-
107
-
Anyway, endless fun and possibilities. Need inspiration, check out the Github API documentation. Oh and please make it look nice (hint: use the stuff you learned in HTML/CSS)!
108
-
109
-
### Step 5: **Some freeCodeCamp challenges:**
60
+
## Step 5: **Some freeCodeCamp challenges:**
110
61
111
62
1.[Comparisons with the Logical And Operator](https://www.freecodecamp.com/challenges/comparisons-with-the-logical-and-operator)
0 commit comments