Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 2fc29dc

Browse files
author
Noer Paanakker
committed
Added projects to all weeks, finished week 3 homework
1 parent 96b54c5 commit 2fc29dc

File tree

9 files changed

+198
-151
lines changed

9 files changed

+198
-151
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ If you have any questions or if something is not entirely clear ¯\\\_(ツ)\_/¯
3434

3535
## Planning
3636

37-
| Week | Topic | Reading Materials | Homework | Lesson Plan |
38-
| ---- | -------------------------------------------------------- | ------------------------------ | ------------------------------- | -------------------------------------- |
39-
| 1. | Document-Object Model (DOM), DOM manipulation | [Reading W1](/Week1/README.md) | [Homework W1](/Week1/MAKEME.md) | [Lesson Plan W1](/Week1/LESSONPLAN.md) |
40-
| 2. | Synchronous vs. asynchronous, Event Loop, Callbacks | [Reading W2](/Week2/README.md) | [Homework W2](/Week2/MAKEME.md) | [Lesson Plan W2](/Week1/LESSONPLAN.md) |
41-
| 3. | Scope, Hoisting, Closures, Thinking like a programmer II | [Reading W3](/Week3/README.md) | [Homework W3](/Week3/MAKEME.md) | [Lesson Plan W3](/Week1/LESSONPLAN.md) |
37+
| Week | Topic | Reading Materials | Homework | Lesson Plan |
38+
| ---- | -------------------------------------------------------------------- | ------------------------------ | ------------------------------- | -------------------------------------- |
39+
| 1. | Document-Object Model (DOM), DOM manipulation | [Reading W1](/Week1/README.md) | [Homework W1](/Week1/MAKEME.md) | [Lesson Plan W1](/Week1/LESSONPLAN.md) |
40+
| 2. | Synchronous vs. asynchronous, Event Loop, Callbacks, Array Functions | [Reading W2](/Week2/README.md) | [Homework W2](/Week2/MAKEME.md) | [Lesson Plan W2](/Week1/LESSONPLAN.md) |
41+
| 3. | Scope, Hoisting, Closures, Thinking like a programmer II | [Reading W3](/Week3/README.md) | [Homework W3](/Week3/MAKEME.md) | [Lesson Plan W3](/Week1/LESSONPLAN.md) |
4242

4343
## Test
4444

Week1/MAKEME.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Before we head into the exercises, it might be nice to do some interactive exerc
1515

1616
## **2. JavaScript exercises**
1717

18+
> Inside of your `JavaScript2` fork, create a folder called `week1`. Inside of that folder, create a folder called `js-exercises`. For all the following exercises create a new `.js` file in that folder (5 files in total). Make sure the name of each file reflects its content: for example, the filename for exercise one could be `bookList.js`.
19+
1820
### 1. The book list
1921

2022
I'd like to display my three favorite books inside a nice webpage!
@@ -112,27 +114,31 @@ Start with this webpage, which has a single img tag of an animated GIF of a cat
112114
4. Create a function called catWalk() that moves the cat 10 pixels to the right of where it started, by changing the "left" style property.
113115
5. Call that function every 50 milliseconds. Your cat should now be moving across the screen from left to right. Hurrah!
114116
6. When the cat reaches the right-hand of the screen, restart them at the left hand side ("0px"). So they should keep walking from left to right across the screen, forever and ever.
115-
7. When the cat reaches the middle of the screen, replace the img with an image of a cat dancing (use this URL: https://tenor.com/StFI.gif), keep it dancing for 10 seconds, and then replace the img with the original image and have it continue the walk.
117+
7. When the cat reaches the middle of the screen, replace the img with an image of a cat dancing (use this URL: https://tenor.com/StFI.gif), keep it dancing for 5 seconds, and then replace the img with the original image and have it continue the walk.
116118

117119
## **3. Code along**
118120

119121
In the following tutorial you'll learn how to make a small web application that allows a user to add new issues to a board. Included is practice with [Bootstrap](https://getbootstrap.com/).
120122

123+
Enjoy!
124+
121125
- [Build an Issue Tracker](https://www.youtube.com/watch?v=NYq9J-Eur9U)
122126

123127
## **4. PROJECT: Random Quote Generator**
124128

125129
> Every week ends with a project you have to build on your own. Instead of getting clear-cut instructions, you'll get a list of criteria that your project needs to measure up to.
126130
127-
In this week's project you'll be making a Random Quote Generator! It includes a text box and a simple button that, when clicked, take a random quote out of a set amount of quotes and show it in the page. Here's how it may look like:
131+
> Before you start, create a new folder called `project` that includes the files for the following app you'll be building.
132+
133+
In this week's project you'll be making a Random Quote Generator! It includes a text box and a simple button that, when clicked, take a random quote out of a set amount of quotes and show it in the page. Here's how it should look:
128134

129135
![Random Quote Generator](../assets/randomquotegenerator.png)
130136

131137
Here are the requirements:
132138

133139
- Include at least 1 JavaScript, CSS and HTML file
134140
- The design should look similar to the one in the picture above
135-
- No frameworks allowed
141+
- No CSS frameworks allowed
136142
- Each time the button is clicked it should show a random quote
137143
- Create a function that fires after the button click
138144
- Collect 6 of your favorite quotes (quote and author) and store them in the right data structure
@@ -148,6 +154,6 @@ If you need a refresher, take a look at the following [guide](../hand-in-homewor
148154
The homework that needs to be submitted is the following:
149155

150156
1. JavaScript exercises
151-
2. Project: Random quote generator
157+
2. Project: Random Quote Generator
152158

153159
_Deadline Saturday 23.59 CET_

Week2/MAKEME.md

Lines changed: 55 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,110 +5,117 @@
55
1. Practice the concepts
66
2. JavaScript exercises
77
3. Code along
8-
4. PROJECT:
8+
4. PROJECT: The Pomodoro Clock
99

1010
## **1. Practice the concepts**
1111

12-
## **2. JavaScript exercises**
12+
Before we head into the exercises, it might be nice to do some interactive exercises first! In the following resource you'll find some exercises that'll teach you all about callbacks and array functions!
13+
14+
- [Learn JavaScript: Iterators](https://www.codecademy.com/learn/introduction-to-javascript/modules/learn-javascript-iterators)
1315

14-
Step 1: More map, filter and
16+
## **2. JavaScript exercises**
1517

16-
_Deadline Wednesday_
18+
> Inside of your `JavaScript2` fork, create a folder called `week2`. Inside of that folder, create a folder called `js-exercises`. For all the following exercises create a new `.js` file in that folder (5 files in total). Make sure the name of each file reflects its content: for example, the filename for exercise one could be `oddOnesOut.js`.
1719
18-
**1.1** Say you would like to write a program that doubles the odd numbers in an array and throws away the even numbers.
20+
**Exercise 1: The odd ones out**
1921

20-
Your solution could be something like this:
22+
Look at the following code snippet:
2123

2224
```js
23-
function doubleOddNumbers(numbers) {
25+
function doubleEvenNumbers(numbers) {
2426
const newNumbers = [];
2527
for (let i = 0; i < numbers.length; i++) {
26-
if (numbers[i] % 2 !== 0) {
28+
if (numbers[i] % 2 === 0) {
2729
newNumbers.push(numbers[i] * 2);
2830
}
2931
}
3032
return newNumbers;
3133
}
3234

3335
const myNumbers = [1, 2, 3, 4];
34-
console.log(doubleOddNumbers(myNumbers)); // ==> [2, 6]
36+
console.log(doubleEvenNumbers(myNumbers)); // Logs "[4, 8]" to the console
3537
```
3638

37-
Rewrite the above `doubleOddNumbers` function using `map` and `filter`; don't forget to use `=>`.
39+
The `doubleEvenNumbers` function returns only the even numbers in the array `myNumbers` and doubles them. Like you've learned in the [README](README.md), this block of code isn't easy to decipher.
40+
41+
Let's rewrite it. Using the `map` and `filter` functions, rewrite the `doubleEvenNumbers` function.
3842

39-
---
43+
**Exercise 2: What's your Monday worth?**
4044

41-
**1.2** Underneath you see a very interesting small insight in Maartje's work:
45+
When you're a developer at a big company your Monday could look something like this:
4246

4347
```js
44-
const monday = [
48+
const mondayTasks = [
4549
{
46-
name: 'Write a summary HTML/CSS',
47-
duration: 180,
50+
name: 'Daily standup',
51+
duration: 30, // specified in minutes
4852
},
4953
{
50-
name: 'Some web development',
54+
name: 'Feature discussion',
5155
duration: 120,
5256
},
5357
{
54-
name: 'Fix homework for class10',
55-
duration: 20,
56-
},
57-
{
58-
name: 'Talk to a lot of people',
59-
duration: 200,
60-
},
61-
];
62-
63-
const tuesday = [
64-
{
65-
name: 'Keep writing summary',
58+
name: 'Development time',
6659
duration: 240,
6760
},
6861
{
69-
name: 'Some more web development',
70-
duration: 180,
71-
},
72-
{
73-
name: 'Staring out the window',
74-
duration: 10,
75-
},
76-
{
77-
name: 'Talk to a lot of people',
78-
duration: 200,
79-
},
80-
{
81-
name: 'Look at application assignments new students',
82-
duration: 40,
62+
name: 'Talk to different members from the product team',
63+
duration: 60,
8364
},
8465
];
8566
```
8667

87-
_Note: the durations are specified in minutes._
68+
Write a program that computes how much Maartje has earned by completing these tasks, using `map` and `filter`.
8869

89-
Write a program that computes how much Maartje has earned by completing these tasks, using `map` and `filter`. For the 'summing part' you can try your luck with `reduce`; alternatively, you may use `forEach` or a `for` loop.
70+
For the 'summing part' you can try your luck with `reduce`; alternatively, you may use `forEach` or a `for` loop.
9071

9172
Follow these steps. Each step should build on the result of the previous step.
9273

9374
- Map the tasks to durations in hours.
9475
- Filter out everything that took less than two hours (i.e., remove from the collection)
9576
- Multiply the each duration by a per-hour rate for billing (use €20/hour) and sum it all up.
9677
- Output a formatted Euro amount, rounded to Euro cents, e.g: `€11.34`.
97-
- Choose variable and parameters names that most accurately describe their contents or purpose. When naming an array, use a plural form, e.g. `durations`. For a single item, use a singular form, e.g. `duration`. For details, see [Naming Conventions](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/naming_conventions.md).
98-
- Don't forget to use `=>`.
78+
- Choose variable and parameters names that most accurately describe their contents or purpose. When naming an array, use a plural form, e.g. `durations`. For a single item, use a singular form, e.g. `duration`.
79+
80+
**Exercise 3**
81+
82+
**Exercise 4**
83+
84+
**Exercise 5 **
9985

10086
## **3. Code along**
10187

88+
Programming can be used to not only make websites, but also games! In the following tutorial you're going to apply your DOM manipulation skills in order to make a classic game: Rock, Paper, Scissors! Enjoy!
89+
10290
- [Build a Rock, Paper, Scissors Game](https://www.youtube.com/watch?v=WR_pWXJZiRY)
10391

104-
## **4. PROJECT: **
92+
## **4. PROJECT: The Pomodoro Clock**
93+
94+
> Every week ends with a project you have to build on your own. Instead of getting clear-cut instructions, you'll get a list of criteria that your project needs to measure up to.
95+
96+
> Before you start, create a new folder called `project` that includes the files for the following app you'll be building.
97+
98+
In this week's project you'll be making a Pomodoro Clock! A user can specify how many minutes the timer should be set, and with a click on the play button it starts counting down! If the user wants to pause the timer, they can do so by clicking the pause button.
99+
100+
It should look like this:
101+
102+
![Pomodoro Clock](../assets/pomodoro.png)
103+
104+
Here are the requirements:
105+
106+
- If the timer is running, the user can't change the session length anymore
107+
- Use at least 3 functions
108+
- Display minutes and seconds
109+
- If the timer finishes the timer should be replaced by the message: `Time's up!`
110+
111+
Good luck!
105112

106113
## **SUBMIT YOUR HOMEWORK!**
107114

108115
After you've finished your todo list it's time to show us what you got! The homework that needs to be submitted is the following:
109116

110117
1. JavaScript exercises
111-
2. PROJECT:
118+
2. PROJECT: The Pomodoro Clock
112119

113120
Upload both to your forked JavaScript2 repository in GitHub. Make a pull request to the original repository.
114121

0 commit comments

Comments
 (0)