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

Skip to content

Commit dab8393

Browse files
author
Noer Paanakker
committed
finished readings + homeworks
1 parent c90ad3c commit dab8393

File tree

8 files changed

+45
-147
lines changed

8 files changed

+45
-147
lines changed

.DS_Store

6 KB
Binary file not shown.

Week1/.DS_Store

6 KB
Binary file not shown.

Week1/LESSONPLAN.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
## Agenda
44

5-
The purpose of this class is to introduce to the student (1)
5+
The purpose of this class is to introduce to the student:
6+
7+
(1) what variables are and why they're used
8+
(2) what a data type is, and which ones there are in JavaScript
69

710
FIRST HALF:
811

Week1/MAKEME.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
1. Practice the concepts
66
2. JavaScript exercises
77
3. Code along
8-
4. PROJECT:
98

10-
## **1. Get to know**
9+
## **1. Practice the concepts**
1110

1211
Before we learn how to build actual applications, we first need to gain experience using JavaScript in a computational way. This teaches us how to think like a programmer, and gives us more experience with the language itself.
1312

@@ -164,31 +163,14 @@ console.log('The length of the array is...' + ...);
164163
165164
## **3. Code along**
166165
167-
We don't want to lose connection with HTML/CSS, so in the following tutorial you'll learn how to build a simple web application use HTML/CSS and JavaScript.
166+
We don't want to lose the connection with HTML/CSS, so in the following tutorial you'll learn how to build a simple web application use HTML/CSS and JavaScript.
168167
169168
You'll first write the HTML and CSS, to provide structure and style to the page. When doing so, keep notice of how the developer chooses to do this. Why do they use this tag instead of something else? Why do they give an element a certain class name?
170169
171170
After, the developer will write JavaScript code. You'll notice it's different from how you've used JavaScript. It is something we call **DOM Manipulation**. Don't worry, you don't need to master this just yet. Just follow along and do some research yourself if you already want to learn more about it!
172171
173172
- [Calculator](https://www.youtube.com/watch?v=6v4vBXL-qkY)
174173
175-
## **4. PROJECT: Temperature converter** NOT FINISHED
176-
177-
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.
178-
179-
In this JavaScript-only project you'll write code that
180-
181-
Follow the instructions:
182-
183-
1. Create a `.js` file that will contain your temperature converter
184-
2.
185-
186-
Example of how to use comments:
187-
188-
```js
189-
const myName = "";
190-
```
191-
192174
## **SUBMIT YOUR HOMEWORK!**
193175
194176
After you've finished your todo list it's time to show us what you got! Starting from this week you'll be submitting all your homework through GitHub. What you'll be doing is upload all your files to a forked repository (a copy from the original, which in this case is the [JavaScript1](https://www.github.com/HackYourFuture/JavaScript1) repository) using GIT.
@@ -198,6 +180,5 @@ Take a look at the following [guide](../hand-in-homework-guide.md) to see how it
198180
The homework that needs to be submitted is the following:
199181
200182
1. JavaScript exercises
201-
2. PROJECT: Temperature converter
202183
203184
_Deadline Saturday 23.59 CET_

Week1/README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
These are the topics for week 1:
66

77
1. What is programming?
8-
- Introduction
9-
- Software
10-
- What is a programming language?
8+
- Introduction
9+
- Software
10+
- What is a programming language?
1111
2. What is web development?
12-
- Web development vs. software development
13-
- Web development vs. web design
14-
- Website vs. web application
12+
- Web development vs. software development
13+
- Web development vs. web design
14+
- Website vs. web application
1515
3. What is JavaScript?
1616
4. What are variables?
17-
- The keywords: let, const, var
18-
- values
17+
- The keywords: let, const, var
18+
- values
1919
5. What are data types?
20-
- 6 basic types
20+
- 6 basic types
2121

2222
## 1. What is programming?
2323

@@ -33,30 +33,30 @@ This is important to note: a computer is a `tool` we use to make our lives easie
3333

3434
Go through the following resources to learn more about what programming is:
3535

36-
- [What is programming?](https://www.youtube.com/watch?v=3tWMQ3ZMjbg)
37-
- [Introduction into programming Playlist](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZYJC7L-r6rX6utt6wwJCyi)
36+
- [What is programming?](https://www.youtube.com/watch?v=3tWMQ3ZMjbg)
37+
- [Introduction into programming Playlist](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZYJC7L-r6rX6utt6wwJCyi)
3838

3939
### Software
4040

4141
As a software developer (synonym to 'programmer'), you will write these instructions in order to create 'software'. Look at the following video to get a better idea of what software is:
4242

43-
- [What is software?](https://www.youtube.com/watch?v=MSA3WsGeTNI)
43+
- [What is software?](https://www.youtube.com/watch?v=MSA3WsGeTNI)
4444

4545
### What is a programming language?
4646

4747
Programming is done using a programming language. Why do we need a language to communicate with the computer? At its most basic level, a computer operates based on 0's and 1's: 0 meaning off, and 1 meaning on. Smart people decided to make this more comprehensible, so that people can more simply communicate with a computer. This is how the development of programming languages started: by defining a vocabulary, grammar and syntax to put more organization to the 0's and 1's, we can more simply communicate exactly what we want to computer to do.
4848

49-
- [What are programming languages](https://hackr.io/blog/what-is-programming-language)
49+
- [What are programming languages](https://hackr.io/blog/what-is-programming-language)
5050

5151
There are various languages, each made to fulfill a certain need. For example, Microsoft developed a language called [C#](https://www.youtube.com/watch?v=paJUbVeKEOU) in order to make applications for Windows computers. Read the following article to learn more about different languages and their uses:
5252

53-
- [14 Programming Languages Explained](https://mikkegoes.com/14-programming-languages-explained/)
53+
- [14 Programming Languages Explained](https://mikkegoes.com/14-programming-languages-explained/)
5454

5555
## 1. What is web development?
5656

5757
In HackYourFuture we focus on `web` programmming (also known as `web development`): writing code that creates websites and web applications. Look at the following video to learn about what you'll be doing:
5858

59-
- [What does a web developer do?](https://www.youtube.com/watch?v=GEfuOMzRgXo)
59+
- [What does a web developer do?](https://www.youtube.com/watch?v=GEfuOMzRgXo)
6060

6161
## Web development vs. software development
6262

@@ -71,7 +71,7 @@ The field of programming is broad. As a software developer (a general term for a
7171

7272
Read the following article to read more about different career paths:
7373

74-
- [Software Development Career Paths](https://simpleprogrammer.com/software-development-career-paths/#title-career-developer-options)
74+
- [Software Development Career Paths](https://simpleprogrammer.com/software-development-career-paths/#title-career-developer-options)
7575

7676
Note: once you've chosen a certain track it doesn't mean you can't try out any other! If anything, you are encouraged to explore and see what fits your taste :)
7777

@@ -91,8 +91,8 @@ This is the difference bteween `static` and `dynamic` sites: a static site alway
9191

9292
Read the following articles to learn more about this:
9393

94-
- [Website vs. Web Application](https://www.seguetech.com/website-vs-web-application-whats-the-difference/)
95-
- [Static vs. dynamic websites](https://www.youtube.com/watch?v=4sP7fp3cp24)
94+
- [Website vs. Web Application](https://www.seguetech.com/website-vs-web-application-whats-the-difference/)
95+
- [Static vs. dynamic websites](https://www.youtube.com/watch?v=4sP7fp3cp24)
9696

9797
## 3. What is JavaScript?
9898

@@ -104,8 +104,8 @@ The main use for JavaScript is to make your webpage interactive: for example, if
104104

105105
Check the following resources to learn more about it:
106106

107-
- [What is JavaScript?](https://www.youtube.com/watch?v=nItSSTwBvSU)
108-
- [What does JavaScript do and what is it used for?](https://www.youtube.com/watch?v=OSWppEa2Zac)
107+
- [What is JavaScript?](https://www.youtube.com/watch?v=nItSSTwBvSU)
108+
- [What does JavaScript do and what is it used for?](https://www.youtube.com/watch?v=OSWppEa2Zac)
109109

110110
## 4. What are variables?
111111

@@ -115,11 +115,11 @@ A variable is a piece of information that is saved. You give it a name that desc
115115

116116
A variable is a central concept within programming. It's applied the same way across almost all programming languages. In JavaScript we apply it by using a `keyword`, a word that is reserved by the language because it has a special meaning. Read more about this in the following article:
117117

118-
- [Variables](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/variables.md)
118+
- [Variables](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/variables.md)
119119

120120
A variable always contains a `value`: a piece of information that you want to refer to at a later stage. Read more about this here:
121121

122-
- [Values](https://www.github.com/hackyourfuture/fundamentals/blob/master/fundamentals/values.md)
122+
- [Values](https://www.github.com/hackyourfuture/fundamentals/blob/master/fundamentals/values.md)
123123

124124
When creating variables, it's important to think about the right name to give it. It should always reflect what "type" of data it contains and how it would make sense in light of the rest of your code. You (and other developers that will read your code) should be able to read a variable name and know what its purpose is.
125125

@@ -142,9 +142,9 @@ A data type is a category of data. It tells the code interpreter what kind of da
142142

143143
There are about 6 basic data types in JavaScript. String, Number, Boolean, Object, Array, and Function. You can read more about them in the following article:
144144

145-
- [JavaScript Data Types](https://www.tutorialrepublic.com/javascript-tutorial/javascript-data-types.php)
146-
- [JS Data Types](https://www.w3schools.com/js/js_datatypes.asp)
147-
- [Variables & Data Types](https://www.youtube.com/watch?v=Hrd3SfCCXZw)
145+
- [JavaScript Data Types](https://www.tutorialrepublic.com/javascript-tutorial/javascript-data-types.php)
146+
- [JS Data Types](https://www.w3schools.com/js/js_datatypes.asp)
147+
- [Variables & Data Types](https://www.youtube.com/watch?v=Hrd3SfCCXZw)
148148

149149
Why do you need to know this? Again, this goes back to computers not being very smart: it needs to know **exactly** how to look at things, what to do with it and in what order.
150150

@@ -154,7 +154,7 @@ In JavaScript, the data types allow us to store various types of information, an
154154

155155
If you feel like you need more information to fill in the gaps of your understanding, check out the following resources to learn more about the basics of JavaScript:
156156

157-
- [Introduction to JavaScript Development](https://www.udemy.com/refactoru-intro-js)
157+
- [Introduction to JavaScript Development](https://www.udemy.com/refactoru-intro-js)
158158

159159
## Finished?
160160

-3.26 MB
Binary file not shown.

Week2/MAKEME.md

Lines changed: 11 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ In this section you will be doing interactice exercises, that will allow you to
1414
- [Codecademy: Arrays](https://www.codecademy.com/courses/introduction-to-javascript/lessons/arrays)
1515
- [FreeCodeCamp: Basic data structures](https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-data-structures)
1616

17-
So far you've been practicing with JavaScript by itself. This is useful, but we shouldn't lose the connection between this and what we learned before: HTML & CSS.
18-
19-
In the following tutorial you'll learn how to combine JavaScript with HTML & CSS in order to build a simple calculator:
20-
21-
- [Calculator]()
22-
2317
## **2. JavaScript exercises**
2418

2519
> For all the following exercises create a new .js file. Try to find a proper name for each file or make a small comment about what it does inside for future reference.
@@ -71,107 +65,27 @@ Ingredients:
7165

7266
Keep track of which books you read and which books you want to read!
7367

74-
1. Create an array of 3 objects, where each object describes a book and has properties for the `title` (string), `author` (string), and `alreadyRead` (boolean indicating if you read it yet).
68+
1. Declare a variable that holds an array of 3 objects, where each object describes a book and has properties for the `title` (string), `author` (string), and `alreadyRead` (boolean indicating if you read it yet).
7569
2. Loop through the array of books.
7670
3. For each book, log the book title and book author like so: "The Hobbit by J.R.R. Tolkien".
7771
4. Create a conditional statement to change the log depending on whether you read it yet or not. If you read it, log a string like `You already read "The Hobbit"` right after the log of the book details
7872
5. If you haven't read it log a string like `You still need to read "The Lord of the Rings"`
7973

80-
**Exercise 5: **
81-
**Exercise 3: **
82-
**Exercise 3: **
74+
**Exercise 5: Who wants a drink?**
75+
76+
You're at a party and you feel thirsty! However, you've got 5 friends who are also in need of a drink. Let's go get them a drink.
8377

84-
**Array exercises!**
78+
1. Declare a variable that holds an empty array, called `drinkTray`.
8579

86-
Consider the following array:
80+
There are 3 different types of drinks:
8781

8882
```js
89-
let favoriteAnimals = ["blowfish", "capricorn", "giraffe"];
83+
const drinkTypes = ["cola", "lemonade", "water"];
9084
```
9185

92-
2.1 Add a statement that adds Mauro's favorite animal _'turtle'_ to the existing array.
93-
2.2 Log your new array!
94-
2.3 Now add Jim's favorite animal to the array, it's _'meerkat'_, but make sure it will be placed after _'blowfish'_ and before _'capricorn'_.
95-
2.4 Write a console.log statement that explains in words _you think_ the new value of the array is.
96-
2.5 Log your new array!
97-
2.6 Log the length of the array, add a message: _'The array has a length of: '_ (here you should show the length of the array).
98-
2.7 Jason does not like _'giraffe'_, delete this animal from the array.
99-
2.8 Again log your new array.
100-
2.9 Now if unlike Jim, you don't like _'meerkat'_ and you want to delete it from the array, but you don't know the position or the `index` of the item in the array, how can you find it?
101-
2.10 Log the index of _'meerkat'_. Add a message so it says: _'The item you are looking for is at index: '_ (here you should show the index of the item).
102-
103-
1. Create a function that takes 3 arguments and returns the sum of the these arguments.
104-
105-
2. Create a function named `colorCar` that receives a color, and prints out, _'a red car'_ for example.
106-
107-
3. Create an object and a function that takes the object as a parameter and prints out all of its properties and values.
108-
109-
4. 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)`
110-
111-
5. Can you write the following without the `if` statement, but with just as a single line with `console.log(...);`?
112-
113-
```js
114-
if (3 === 3) {
115-
console.log("yes");
116-
} else {
117-
console.log("no");
118-
}
119-
```
120-
121-
6. Create a function called `vehicle`, like before, but takes another parameter called `age`, so that `vehicle("blue", 1, 5)` prints _'a blue used car'_
122-
123-
7. Make a list of vehicles, you can add `"motorbike"`, `"caravan"`, `"bike"`, or more.
124-
125-
8. How do you get the third element from that list?
126-
127-
9. Change the function `vehicle` to use the list of question 7. So that `vehicle("green", 3, 1)` prints "a green new bike".
128-
129-
10. Use the list of vehicles to write an advertisement. So that it prints something like: `"Amazing Joe's Garage, we service cars, motorbikes, caravans and bikes."`. (Hint: use a `for` loop.)
130-
131-
> Hint, the output should be correct English with all the punctuation in place (that's the challenge). So plurals for the vehicle types, commas followed by a single space, the word and to replace the final comma and closed off by a period.
132-
133-
11. What if you add one more vehicle to the list, can you have that added to the advertisement without changing the code for question 10?
134-
135-
12. Create an empty object.
136-
137-
13. Create an object that contains the teachers that you have had so far for the different modules.
138-
139-
14. Add a property to the object you just created that contains the languages that they have taught you.
140-
141-
15. Write some code to test two arrays for equality using `==` and `===`. Test the following:
142-
143-
```js
144-
let x = [1, 2, 3];
145-
let y = [1, 2, 3];
146-
let z = y;
147-
```
148-
149-
What do you think will happen with `x == y`, `x === y` and `z == y` and `z == x`? Prove it!
150-
151-
Check out this [Fiddle](http://jsfiddle.net/jimschubert/85M4z/). You need to open your browser’s Developer Tools to see the console output. Press the Run button in the upper right corner to run the code.
152-
153-
More insights from this [Stack Overflow question](http://stackoverflow.com/questions/22395357/how-to-compare-two-arrays-are-equal-using-javascript).
154-
155-
16. Take a look at the following code:
156-
157-
```js
158-
let o1 = { foo: "bar" };
159-
let o2 = { foo: "bar" };
160-
let o3 = o2;
161-
```
162-
163-
Show that changing `o2` changes `o3` (or not) and changing `o1` changes `o3`(or not).
164-
165-
Does the order that you assign (`o3 = o2` or `o2 = o3`) matter?
166-
167-
17. What does the following code return? (And why?)
168-
169-
```js
170-
let bar = 42;
171-
typeof typeof bar;
172-
```
86+
2.
17387

174-
> ‘Coerce' means to try to change - so coercing `var x = '6'` to number means trying to change the type to number temporarily.
88+
3. adsa
17589

17690
## **3. Code along**
17791

@@ -183,7 +97,7 @@ It's ok if you don't understand exactly what's happening here. Just follow along
18397

18498
**Project 1: Temperature Converter**
18599

186-
This project will teach you how to convert the temperature from one scale to another in real-time!
100+
This project will teach you how to convert temperature from one scale to another in real-time!
187101

188102
In the first part you'll be building the basic frontend, which means the way the page is going to look using only HTML/CSS. In the second part you'll be writing the logic that will allow a user to convert the temperature from one temperature scale to another (i.e. Celsius to Fahrenheit)
189103

@@ -240,7 +154,7 @@ Good luck!
240154
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:
241155

242156
1. JavaScript exercises
243-
2. PROJECT:
157+
2. PROJECT: Grade calculator
244158

245159
Upload both to your forked JavaScript1 repository in GitHub. Make a pull request to the original repository.
246160

Week3/MAKEME.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ If you have time left over and feel like you could go for more practice, try out
142142

143143
- [JavaScript30](https://javascript30.com/)
144144

145-
In this free course, you'll build 30 small projects that will sharpen your HTML, CSS and JavaScript skills. Each project is meant to show you different ways you could use programming to make fun and useful things! Have fun!
145+
In this free course, you'll build 30 small projects that will sharpen your HTML, CSS and JavaScript skills. Each project is meant to show you different ways you could use programming to make fun and useful things! Enjoy!
146146

147147
## **SUBMIT YOUR HOMEWORK!**
148148

149149
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:
150150

151151
1. JavaScript exercises
152-
2. PROJECT: Grade calculator
152+
2. PROJECT: Credit card validator
153153

154154
Upload both to your forked JavaScript1 repository in GitHub. Make a pull request to the original repository.
155155

0 commit comments

Comments
 (0)