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

Skip to content

Commit b95c4cb

Browse files
committed
updated homework week4
1 parent 4d0883d commit b95c4cb

File tree

7 files changed

+72
-37
lines changed

7 files changed

+72
-37
lines changed

Week1/MAKEME.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,19 @@ For example:
6868
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).
6969

7070
### How to hand in Homework:
71-
>steps:
72-
- Create a Github account
73-
- Create a new repository (name it something like hyf-javascript1) make sure you select the option: initialize with README
74-
- inside this repository create a folder "week1"
75-
- Upload the files you created on your computer inside the week1 folder, write a description for this “commit”
76-
- Open the file in your README to check if this all worked
77-
78-
>Create a new repository "hyf-javascript1". Also create a new folder "week1" inside this repository.
79-
Upload your homework files inside the week1 folder and write a description for this “commit”.
80-
Your hyf-javascript1/week1 should now contain all your homework files.
81-
Place the link to your repository folder in Trello.
71+
```
72+
steps:
73+
• Create a Github account
74+
• Create a new repository (name it something like hyf-javascript1) make sure you select the option: initialize with README
75+
• inside this repository create a folder "week1"
76+
• Upload the files you created on your computer inside the week1 folder, write a description for this “commit”
77+
• Open the file in your README to check if this all worked
78+
79+
• Create a new repository "hyf-javascript1". Also create a new folder "week1" inside this repository.
80+
• Upload your homework files inside the week1 folder and write a description for this “commit”.
81+
• Your hyf-javascript1/week1 should now contain all your homework files.
82+
• Place the link to your repository folder in Trello.
83+
```
8284

8385
### Hint
8486
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.

Week2/MAKEME.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,13 @@ Please make sure you REALLY understand the exercises below:
143143
- https://www.freecodecamp.com/challenges/add-new-properties-to-a-javascript-object
144144
- https://www.freecodecamp.com/challenges/delete-properties-from-a-javascript-object
145145

146-
>Upload your homework in your "hyf-javascript1" Github repository. Make sure to create a new folder "week2" first.
147-
Upload your homework files inside the week2 folder and write a description for this “commit”.
148-
Your hyf-javascript1/week2 should now contain all your homework files.
149-
Place the link to your repository folder in Trello.
146+
```
147+
How to hand in your homework:
148+
• Upload your homework in your "hyf-javascript1" Github repository. Make sure to create a new folder "week2" first.
149+
• Upload your homework files inside the week2 folder and write a description for this “commit”.
150+
• Your hyf-javascript1/week2 should now contain all your homework files.
151+
• Place the link to your repository folder in Trello.
152+
```
150153

151154
:star: Additional resources and review: [here](https://github.com/HackYourFuture/JavaScript/tree/master/Week2/REVIEW.md) (work in progress):star:
152155

Week3/MAKEME.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ Your Github should contain two repositories called hyf-javascript1 and hyf-comma
3434

3535
7. Download book covers for each book, construct a new Object which has as keys the bookId's again, and as value the path to the image source (e.g. `{"harry_potter_blabla": "./img/harry_potter_blabla.jpg", ...}`). Now loop over these entries (_hint: `Object.keys(objectName)` gives you an array containing the keys_). Then write a function which places an image at the corresponding `li` element. Remember that Objects are not ordered, so you cannot guarantee that the first key is the first `li` element. (_Hint: you could give each `li` item an `id` tag by modifying the function you made before_)
3636

37-
>Upload your homework in your "hyf-javascript1" Github repository. Make sure to create a new folder "week3" first.
38-
Upload your homework files inside the week3 folder and write a description for this “commit”.
39-
Your hyf-javascript1/week3 should now contain an index.html, main.css and a script.js file (and the images folder)
40-
Place the link to your repository folder in Trello.
37+
```
38+
How to hand in your homework:
39+
• Upload your homework in your "hyf-javascript1" Github repository. Make sure to create a new folder "week3" first.
40+
• Upload your homework files inside the week3 folder and write a description for this “commit”.
41+
• Your hyf-javascript1/week3 should now contain an index.html, main.css and a script.js file (and the images folder)
42+
• Place the link to your repository folder in Trello.
43+
```
4144

4245
## Step 4: **FreeCodeCamp challenges:**
4346

Week3/REVIEW.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ document.getElementById("myH").innerHTML = "My First Page";
214214

215215
Single line comments at end of the line:
216216
```js
217-
var x = 5; // Declare x, give it the value of 5
217+
const x = 5; // Declare x, give it the value of 5
218218
```
219219

220220
Coding **well** in JavaScript: [JSDoc](http://usejsdoc.org/)

Week4/MAKEME.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,33 @@
22

33
>[Here](https://github.com/HackYourFuture/JavaScript/tree/master/Week4/README.md) you find the readings you have to complete before the fourth lecture.
44
5-
## Step 1: Some Challenges:
5+
## Step 0:
6+
Give yourself (or your neighbor) a little tap on the shoulder, you've made it to JS2! :muscle:
7+
8+
## Step 1: Some Challenges
69
- https://www.freecodecamp.com/challenges/using-objects-for-lookups
710
- https://www.freecodecamp.com/challenges/manipulating-complex-objects
811
- https://www.freecodecamp.com/challenges/convert-json-data-to-html
912

10-
## Step 2: Custom Challenge
13+
## Step 2: Custom challenge
14+
1. Go to http://www.omdbapi.com/?s=dog and change the word dog in the url to a different common word. You will get as a result, a list of movies with this word in the title. Make sure you get at least 5 results.
15+
2. You can copy the JSON and put it in a string at the top of your js file. Print the title of the 3rd movie in the array to the console.
16+
3. Make a ul with a li for each title (just like you did with the books in the previous assignment
17+
4. Use CSS to divide the page in two columns. The left column will have a list of the titles for each movie. The right column will have all the information listed for each movie.
18+
5. Replace the "Poster" property with the actual image of the poster. If you do this correctly, in the right column there will be a picture for each movie.
19+
6. Use the imdbID to create an URL to the IMDB page for that movie (hint: IMDB urls always look like this http://www.imdb.com/title/[imdbId] where [imdbId] would be replaced by the actual Id. If you do this correctly, each movie will have a link to its own IMDB page. Make sure the link opens in a new tab
20+
21+
## Step 3:
22+
23+
Give one of you fellow students in Github feedback about their code of step two, create an issue in their repo, telling them what they did great and what they can improve.
24+
25+
## Step 4: Almost there...
1126

12-
In the HYF Movies Hands-On, we created the function `sortByImdbRating(movies)` to sort the list of movies by IMDB rating. Replace this function by a generalised version that takes the name of the property (`propName`) to sort on and a number `order` (allowed values 1 or -1, default value = 1) to indicate respectively ascending or descending sort order:
27+
Created a function `sortByImdbRating(movies)` to sort the list of movies by IMDB rating.
28+
29+
### :boom: Bonus homework :boom:
30+
31+
Replace this function by a generalised version that takes the name of the property (`propName`) to sort on and a number `order` (allowed values 1 or -1, default value = 1) to indicate respectively ascending or descending sort order:
1332

1433
```
1534
function sortMovies(movies, propName, order)
@@ -31,8 +50,12 @@ Notes:
3150
1. Do not bother to make this work for the `Ratings` property which refers to an object rather than a simple value.
3251
2. It is not necessary to convert property values containing dates or numbers formatted with embedded commas to facilitate sorting for this challenge (but you're welcome to try). You can leave the value 'as is'.
3352

34-
>Create a new repository "hyf-javascript2". Also create a new folder "week1" inside this repository.
35-
Upload your homework files inside the week1 folder and write a description for this “commit”.
36-
Your hyf-javascript2/week1 should now contain the files of your homework.
37-
Place the link to your repository folder in Trello.
53+
:octocat:
54+
```
55+
How to hand in your homework:
56+
• Create a new repository "hyf-javascript2". Also create a new folder "week1" inside this repository.
57+
• Upload your homework files inside the week1 folder and write a description for this “commit”.
58+
• Your hyf-javascript2/week1 should now contain the files of your homework.
59+
• Place the link to your repository folder in Trello.
60+
```
3861

Week5/MAKEME.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
Look at the [documentation of the API](https://github.com/typicode/json-server) and see which other query parameters `json-server` support. Mess around with this to see how changing (or adding) parameters modifies your results.
2424

25-
4. Use the code from your previous assignment to render the new results. If you have already displayed previous results make sure you clear them (hint: `someElement.removeChild(someChild)`). Make sure you style these results, use a style sheet for this! Also make sure you do not use javascript to construct static elements. This way you can handle the positioning of elements easier.
25+
4. Use the code from your previous assignment to render the new results. If you have already displayed previous results make sure you clear them (hint: `someElement.removeChild(someChild)`). Make sure you style these results, use a style sheet for this! Also make sure you do not use JavaScript to construct static elements. This way you can handle the positioning of elements easier.
2626

2727
5. Change the layout of the page so that you only show a list of movie titles on the left side of your page. When the user hovers over a link (or maybe with a click) you want to show the additional information about the movie (poster, year etc.) on the right column.
2828

@@ -111,9 +111,11 @@ console.log(y);
111111
```
112112
If you are confused please run the code and then consult the Google for "javascript pass by value pass by reference"
113113
114-
>Upload your homework in your "hyf-javascript2" Github repository. Make sure to create a new folder "week2" first.
115-
Upload your homework files inside the week2 folder and write a description for this “commit”.
116-
Your hyf-javascript2/week2 should now contain all your homework files.
114+
```
115+
How to hand in your homework:
116+
• Upload your homework in your "hyf-javascript2" Github repository. Make sure to create a new folder "week2" first.
117+
• Upload your homework files inside the week2 folder and write a description for this “commit”.
118+
• Your hyf-javascript2/week2 should now contain all your homework files.
117119
Place the link to your repository folder in Trello.
118-
120+
```
119121

Week6/MAKEME.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ __Requirements__:
2626
6. Make sure that when a user goes to your app, your github account info is loaded. They can then use the search field to find info about other github accounts.
2727
7. BONUS: Look through the data that Github sends back to you on your first API call and think about what other info would be usefull. Add more functionalities to your app like showing how many people starred a repositories or showing the names of the people followed by the current user.
2828

29-
>Upload your homework in your "hyf-javascript2" Github repository. Make sure to create a new folder "week3" first.
30-
Upload your homework files inside the week3 folder and write a description for this “commit”.
31-
Your hyf-javascript2/week3 should now contain an index.html, main.css and a script.js file (and the images folder)
32-
Place the link to your repository folder in Trello.
33-
29+
```
30+
How to hand in your homework:
31+
• Upload your homework in your "hyf-javascript2" Github repository. Make sure to create a new folder "week3" first.
32+
• Upload your homework files inside the week3 folder and write a description for this “commit”.
33+
• Your hyf-javascript2/week3 should now contain an index.html, main.css and a script.js file (and the images folder)
34+
• Place the link to your repository folder in Trello.
35+
```

0 commit comments

Comments
 (0)