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

Skip to content

Commit f3737ed

Browse files
committed
changed shedule added review
1 parent b94ad3c commit f3737ed

File tree

8 files changed

+442
-57
lines changed

8 files changed

+442
-57
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Here you can find course content and homework for the JavaScript 1,2 and 3 modul
77

88
|Week|Topic|Read|Homework|
99
|----|-----|----|--------|
10-
|0.|Preparation for your first JavaScript session|[Pre-reading](https://github.com/HackYourFuture/JavaScript/tree/master/Week0)|-|
11-
|1.|• Intro JavaScript (What is it, where can you use it for)<br>• Basic Data types [Strings, Numbers, Arrays]<br>• Variables<br>• Operators<br>• Conditions <br>• Naming conventions| [CLI Reading Week 1](https://github.com/HackYourFuture/CommandLine/blob/master/Lecture-1.md)| [Homework Week 1](https://github.com/HackYourFuture/JavaScript/tree/master/Week1/MAKEME.md)|
12-
|2.|[CLI](https://github.com/HackYourFuture/CommandLine) session with Unmesh :heart: <br>Loops (for/while)<br>• Functions <br>• Closures <br>• Scope |[Reading Week 2](https://github.com/HackYourFuture/JavaScript/tree/master/Week2)|[JS](https://github.com/HackYourFuture/JavaScript/tree/master/Week2/MAKEME.md) + [CLI Homework Week 2](https://github.com/HackYourFuture/CommandLine/blob/master/HomeWork.md)|
13-
|3.|[CLI](https://github.com/HackYourFuture/CommandLine) session with Unmesh :balloon:<br>• Advanced data types [Objects] <br>• Array Manipulations <br>• Basic DOM manipulations [img src, innerHTML]<br>• Code commenting|[Reading Week 3](https://github.com/HackYourFuture/JavaScript/tree/master/Week3)|[Homework Week 3](https://github.com/HackYourFuture/JavaScript/tree/master/Week3/MAKEME.md)|
10+
|0.|Preparation for your first JavaScript session|[Pre-reading](https://github.com/HackYourFuture/JavaScript/tree/master/Week0) + [CLI Reading Week 1](https://github.com/HackYourFuture/CommandLine/blob/master/Lecture-1.md)|-|
11+
|1.|[CLI](https://github.com/HackYourFuture/CommandLine) session with Unmesh :heart:Intro JavaScript (What is it, where can you use it for)<br>• Variables [var, let, const]<br>• Basic Data types [Strings, Numbers, Arrays]<br>• Operators| TBA | [Homework Week 1](https://github.com/HackYourFuture/JavaScript/tree/master/Week1/MAKEME.md) + [CLI Homework Week 1](https://github.com/HackYourFuture/CommandLine/blob/master/HomeWork.md)|
12+
|2.|[CLI](https://github.com/HackYourFuture/CommandLine) session with Unmesh :balloon: <br>• Conditions <br>• Naming conventions <br> • Loops (for/while)<br>• Functions <br>• Closures <br>• Scope |[Reading Week 2](https://github.com/HackYourFuture/JavaScript/tree/master/Week2)|[JS](https://github.com/HackYourFuture/JavaScript/tree/master/Week2/MAKEME.md)|
13+
|3.|• Advanced data types [Objects] <br>• Array Manipulations <br>• Basic DOM manipulations [img src, innerHTML]<br>• Code commenting|[Reading Week 3](https://github.com/HackYourFuture/JavaScript/tree/master/Week3)|[Homework Week 3](https://github.com/HackYourFuture/JavaScript/tree/master/Week3/MAKEME.md)|
1414
|4.|• First Git Session with Unmesh :smiling_imp:<br>• JSON<br>• Code debugging using the browser<br>• Functions + JSON/Arrays<br>• Code flow (order of execution) <br>• (capturing user input) <br>• Structuring code files|[Reading Week 4](https://github.com/HackYourFuture/JavaScript/tree/master/Week4)|[JS](https://github.com/HackYourFuture/JavaScript/tree/master/Week4/MAKEME.md) + [Git Homework Week 4](https://github.com/HackYourFuture/Git/blob/master/Lecture-1.md)|
1515
|5.|• Second Git Session :see_no_evil:<br>• Events<br>• Callbacks <br>• XHTTP Requests <br>• API calls|[Reading Week 5](https://github.com/HackYourFuture/JavaScript/tree/master/Week5)|[Homework Week 5](https://github.com/HackYourFuture/JavaScript/tree/master/Week5/MAKEME.md) |
1616
|6.|• Async VS Sync <br>• Polling<br>• Structure for a basic SPA <br> TEST :boom:|[Reading Week 6](https://github.com/HackYourFuture/JavaScript/tree/master/Week6)|[Homework Week 6](https://github.com/HackYourFuture/JavaScript/tree/master/Week6/MAKEME.md)|

Week0/MAKEME.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

Week1/MAKEME.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,48 @@
11
## Assignments week 1:
22

3+
We covered a bit of command line usage in the first class and got a program running which is great. If you need a refresher for the command line please have a look here: https://github.com/HackYourFuture/CommandLine
4+
5+
### Homework
6+
37
1. Create a `.js` file that prints `Hello` when you run it from the command line. (Hint: `node` is the program that can run your JavaScript files.)
48

5-
2. Create a function that takes 3 arguments and returns the sum of the three arguments.
9+
2. Write a program (like we did in class) that checks the types of two varibales and prints out `SAME TYPE` if they are the same type.
10+
For example:
11+
```js
12+
let x = 9;
13+
let y = 'Hello';
14+
15+
if () {
16+
console.log('SAME TYPE');
17+
}
18+
19+
```
20+
21+
3. Create a function that takes 3 arguments and returns the sum of the three arguments.
622

7-
3. Create a function named `colorCar` that receives a color, and prints out, "a red car" for example. (Hint: put it in your file and run it like before.)
23+
4. Create a function named `colorCar` that receives a color, and prints out, "a red car" for example. (Hint: put it in your file and run it like before.)
824

9-
4. Create an object and a function that takes the object as a parameter and prints out all of its names and values.
25+
5. Create an object and a function that takes the object as a parameter and prints out all of its names and values.
1026

11-
3. Create a function named `vehicleType` that receives a color, and a code, 1 for car, 2 for motorbike. And prints "a blue motorbike" for example when called as `vehicleType("blue", 2)`
27+
6. Create a function named `vehicleType` that receives a color, and a code, 1 for car, 2 for motorbike. And prints "a blue motorbike" for example when called as `vehicleType("blue", 2)`
1228

13-
4. Create a function called `vehicle`, like before, but takes another parameter called age, so that `vehicle("blue", 1, 5)` prints "a blue used car"
29+
7. Create a function called `vehicle`, like before, but takes another parameter called age, so that `vehicle("blue", 1, 5)` prints "a blue used car"
1430

15-
5. Make a list of vehicles, you can add `"motorbike"`, `"caravan"`, `"bike"`, or more.
31+
8. Make a list of vehicles, you can add `"motorbike"`, `"caravan"`, `"bike"`, or more.
1632

17-
6. How do you get the third element from that list?
33+
9. How do you get the third element from that list?
1834

19-
7. Change the function `vehicle` to use the list of question 5. So that `vehicle("green", 3, 1)` prints "a green new caravan".
35+
10. Change the function `vehicle` to use the list of question 5. So that `vehicle("green", 3, 1)` prints "a green new caravan".
2036

21-
8. Use the list of vehicles to write an advertisment. So that it prints something like: `"Amazing Joe's Garage, we service cars, motorbikes, caravans and bikes."`. (Hint: use a `for` loop.)
37+
11. Use the list of vehicles to write an advertisment. So that it prints something like: `"Amazing Joe's Garage, we service cars, motorbikes, caravans and bikes."`. (Hint: use a `for` loop.)
2238

23-
9. What if you add one more vehicle to the list, can you have that added to the advertisement without changing the code for question 8?
39+
12. What if you add one more vehicle to the list, can you have that added to the advertisement without changing the code for question 8?
2440

25-
10. Write a program to answer the following questions:
41+
13. Write a program to answer the following questions:
2642
* Can you store multiple types in an array? Numbers and strings?
2743
* Can you compare inifities? (Not in Eyad's world) - does 6/0 == 10/0? How can you test this?
2844

29-
11. Can you write the following without the `if` statement, but with just as a single line with `console.log(...);`?
45+
14. Can you write the following without the `if` statement, but with just as a single line with `console.log(...);`?
3046
```js
3147
if (3 == 3) {
3248
console.log("true")

Week1/REVIEW.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# REVIEW JavaScript Basics
2+
3+
## Variables
4+
5+
A "variable" is a place where you can store information, such as a string, or a number. New variables in JavaScript are declared using one of three keywords: let, const, or var.
6+
7+
### Variable declaration
8+
9+
Variables are "declared" using the `var`, `let` or `const` keyword:
10+
11+
```js
12+
var x;
13+
let foo;
14+
const bar;
15+
```
16+
17+
### let and const
18+
- read about [let](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let)
19+
- read about [const](https://developer.mozilla.org/nl/docs/Web/JavaScript/Reference/Statements/const)
20+
- [let vs const] (http://wesbos.com/let-vs-const/)
21+
22+
>TODO - reconsider resources.
23+
24+
Here, we say: "declare variable x and initialize it with the integer (number) 5".
25+
26+
```js
27+
let foo; // declare variable `foo`
28+
let foo = 6; // declare and assign a variable at the same time
29+
```
30+
31+
You can also assign a value to an existing variable:
32+
```js
33+
foo = 4; // change variable `foo`
34+
35+
```
36+
37+
38+
Basic Data types [Strings, Numbers, Arrays]
39+
40+
## Variable types
41+
42+
All variables have a type. In our example above, the variable `x` is a `number`. JavaScript supports the following types:
43+
44+
* `string`, e.g. "HackYourFuture"
45+
* `number`, e.g. 5, or 10.6
46+
* `boolean`, e.g. `true` or `false`
47+
* `array`\*, e.g. `[1, 2, 3]` or `['what', 'is', 'your', 'name']`
48+
* `object`, e.g. `{name: 'John', age: 24}`, or the special object `null`
49+
* `function`, e.g. `function () { return 4; }`
50+
* `symbol`
51+
52+
In addition, a variable may be `undefined`. This is also a special type.
53+
54+
To get the type of a variable, use the following code:
55+
56+
```js
57+
var x = 5;
58+
var typeOfX = typeof x; // -> "number"
59+
```
60+
61+
Note that I've put an asterisk behind 'array'. That is because in JavaScript, array is a special kind of object:
62+
63+
```js
64+
var arr = [1, 2, 3];
65+
var typeOfArr = typeof arr; // -> "object"
66+
```
67+
68+
However, in our communication, we will call these variables arrays.
69+
70+
### Null & undefined
71+
72+
The values `null` and `undefined` are very similar in JavaScript, but they behave a bit differently. The difference is that `null` always has type "object", and `undefined` always has type "undefined".
73+
74+
Whenever you declare a variable, but you don't set a value, the variable will become `undefined`. JavaScript will never make a variable `null` unless you explicitly program it.
75+
76+
```js
77+
var x;
78+
console.log(typeof x); // -> "undefined"
79+
```
80+
81+
82+
## Arrays
83+
84+
Variables that are arrays contain a list of things, instead of just one thing. What's inside the array, we typically call "elements". So, the array `[1, 2, 3]` has three elements. The array `[]` has no elements and is therefore empty. The number of elements in an array is called its "length".
85+
86+
When you want to access an element inside an array, you use an "index". This is the number that you put between brackets (`[]`).
87+
88+
Given the following code:
89+
90+
```js
91+
var arr = ['john', 'jane', 'jack'];
92+
console.log(arr[0]);
93+
```
94+
95+
The number `0` is the "index of the first element of array `arr`". Conversely, the element "at index 0 in array `arr` is `'john'`".
96+
97+
Instead of a number, you can also use a variable to access elements in an array, *as long as this variable is a number*:
98+
99+
```js
100+
var arr = ['john', 'jane', 'jack'];
101+
var a = 1;
102+
console.log(arr[a]); // -> jane
103+
```
104+
105+
If the index you use is not an integer (a whole number), or if it's less than `0` or if it's greater than or equal to the array's length, you will get back `undefined`.
106+
107+

Week3/MAKEME.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ https://developer.mozilla.org/en/docs/Web/JavaScript/Closures
1515

1616
And just for fun ... https://www.freecodecamp.com/challenges/sum-all-numbers-in-a-range
1717

18-
And a custom DOM manipulation challenge :mortar_board:
18+
## And a custom DOM manipulation challenge :mortar_board:
1919

2020
1. Open a new js file and start by declaring in array with in there 10 strings. These strings should be of book title's you have read (or made up) and be lowercase without spaces or special characters so that you can use these later as Id's. (Example: Harry Potter's - The Chamber of Secrets -> `harry_potter_chamber_secrets`).
2121

Week7/MAKEME.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,30 @@
1010
- Add map, filter, reduce to your existing app to build an application that loads data from github, filters out based on certain value, map->reduces to a data object and render that object to the dom (using map again).
1111
- Add polling to your app so that it checks every minute or so if a new repo has been made and if it has, adds it to the DOM without reloading the page.
1212
- Add a readme to your repo explaining what your app does and how to use your app. Here's a [template](https://gist.github.com/jxson/1784669) and here you can see how to make [your readme awesome](https://gist.github.com/rrgayhart/91bba7bb39ea60136e5c).
13+
14+
## What we did in lecture 1:
15+
Code Kata Race
16+
17+
- [Problem 1](https://www.codewars.com/kata/keep-up-the-hoop)
18+
- [Problem 2](https://www.codewars.com/kata/find-the-first-non-consecutive-number)
19+
- [Problem 3](https://www.codewars.com/kata/negation-of-a-value)
20+
21+
22+
## Js Homework (ALL OF YOU SHOULD TO AT LEAST ATTEMPT PROBLEMS 1-5):
23+
- [Homework](https://www.codewars.com/collections/hyf-homework-1)
24+
- [BONUS](https://www.codewars.com/collections/hyf-homework-1-bonus-credit) :collision:
25+
26+
Remember the person with the most kata points gets a prize from Gijs (and you can do exercises on this website without me telling you to - anything kyu 7 or kyu 8 you can try to do - kyu 6 or lower is probably too hard)
27+
28+
- Hint for Q1: split your code into two parts, one part for the case that one of the two strings has an extra letter at the start or the end but is otherwise identical & one part for the case that the strings are the same length but one character is different in one of the strings
29+
- Also for Q1 this function on strings might be useful: [JavaScript String slice() method](https://www.w3schools.com/jsref/jsref_slice_string.asp)
30+
- Also potentially useful: [JavaScript String charAt() Method](https://www.w3schools.com/jsref/jsref_charat.asp)
31+
- [Hint for Q2](https://www.w3schools.com/jsref/jsref_sort.asp) Also there are no sample tests, you need to use submit
32+
33+
## To watch before the next lecture:
34+
(watch in this order)
35+
36+
1. [Stacks/Queues](https://www.youtube.com/watch?v=wjI1WNcIntg) (5 mins)
37+
2. [JS Event Loops](https://www.youtube.com/watch?v=8aGhZQkoFbQ) (26 mins, watch this one twice or until you understand it)
38+
39+

Week8/MAKEME.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,17 @@ This week you will work on finishing your application so it's actually useful!!
33

44
[Read this](https://github.com/HackYourFuture/JavaScript/tree/master/Week8/README.md)
55

6-
Make this
7-
- Check if you have met all the requirements from the previous 2 weeks of homework
6+
## The tools we used in the second lecture
7+
- [metajs](http://int3.github.io/metajs/)
8+
- [latentflip](http://latentflip.com/loupe/?code=Y29uc3QgcCA9IG5ldyBQcm9taXNlKGZ1bmN0aW9uKHJlc29sdmUsIHJlamVjdCl7CiAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAgICAgICAgY29uc3QgZGljZVJvbGwgPSBNYXRoLmNlaWwoTWF0aC5yYW5kb20oKSAqIDYpOwogICAgICAgIGNvbnNvbGUubG9nKGRpY2VSb2xsKTsKICAgICAgICBpZihkaWNlUm9sbCA9PT0gNikKICAgICAgICAgICAgcmVqZWN0KG5ldyBFcnJvcigncm9sbGVkIGEgc2l4JykpCiAgICAgICAgZWxzZQogICAgICAgICAgICByZXNvbHZlKGRpY2VSb2xsKQogICAgfSwgNTAwMCk7Cn0pOwoKCnAKICAgIC50aGVuKGZ1bmN0aW9uKHJvbGwpewogICAgICAgIGNvbnNvbGUubG9nKCdkaWNlIHJvbGxlZCBhICcgKyByb2xsKQogICAgfSkKICAgIC5jYXRjaChmdW5jdGlvbihlcnIpewogICAgICAgIAogICAgfSk7!!!PGJ1dHRvbj5DbGljayBtZSE8L2J1dHRvbj4%3D)
9+
10+
- [Codewars](https://www.codewars.com/collections/hyf-homework-number-2)
11+
- If you need to refresh your memory on es6 classes: [es6-classes-in-depth](https://ponyfoo.com/articles/es6-classes-in-depth)
12+
- Also read this article on scopes & closures: [explaining-javascript-scope-and-closures](https://robertnyman.com/2008/10/09/explaining-javascript-scope-and-closures/)
13+
14+
15+
<!-- ###Make this
16+
817
- Resolve your Github issues (DO NOT CLOSE AN ISSUE WITHOUT AN EXPLANATION OF BY REFERENCING IT FROM A COMMIT)
918
- Make sure you have implemented map, filter, reduce. If you lack inspiration, ask on Slack.
1019
- Implement promises in your XHR
@@ -14,4 +23,5 @@ Make this
1423
- Implement a loader icon like in [my codepen](https://codepen.io/Razpudding/pen/BRGqJw) for each xhr response the user has to wait for.
1524
- Add correct HTML/CSS
1625
17-
If you get stuck, remember we have Slack and you can ask questions.
26+
If you get stuck, remember we have Slack and you can ask questions. -->
27+

0 commit comments

Comments
 (0)