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: Week1/MAKEME.md
+2-21Lines changed: 2 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,8 @@
5
5
1. Practice the concepts
6
6
2. JavaScript exercises
7
7
3. Code along
8
-
4. PROJECT:
9
8
10
-
## **1. Get to know**
9
+
## **1. Practice the concepts**
11
10
12
11
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.
13
12
@@ -164,31 +163,14 @@ console.log('The length of the array is...' + ...);
164
163
165
164
## **3. Code along**
166
165
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.
168
167
169
168
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?
170
169
171
170
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!
## **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
-
constmyName="";
190
-
```
191
-
192
174
## **SUBMIT YOUR HOMEWORK!**
193
175
194
176
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
198
180
The homework that needs to be submitted is the following:
Copy file name to clipboardExpand all lines: Week1/README.md
+26-26Lines changed: 26 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -5,19 +5,19 @@
5
5
These are the topics for week 1:
6
6
7
7
1. What is programming?
8
-
- Introduction
9
-
- Software
10
-
- What is a programming language?
8
+
- Introduction
9
+
- Software
10
+
- What is a programming language?
11
11
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
15
15
3. What is JavaScript?
16
16
4. What are variables?
17
-
- The keywords: let, const, var
18
-
- values
17
+
- The keywords: let, const, var
18
+
- values
19
19
5. What are data types?
20
-
- 6 basic types
20
+
- 6 basic types
21
21
22
22
## 1. What is programming?
23
23
@@ -33,30 +33,30 @@ This is important to note: a computer is a `tool` we use to make our lives easie
33
33
34
34
Go through the following resources to learn more about what programming is:
35
35
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)
38
38
39
39
### Software
40
40
41
41
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:
42
42
43
-
-[What is software?](https://www.youtube.com/watch?v=MSA3WsGeTNI)
43
+
-[What is software?](https://www.youtube.com/watch?v=MSA3WsGeTNI)
44
44
45
45
### What is a programming language?
46
46
47
47
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.
48
48
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)
50
50
51
51
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:
52
52
53
-
-[14 Programming Languages Explained](https://mikkegoes.com/14-programming-languages-explained/)
53
+
-[14 Programming Languages Explained](https://mikkegoes.com/14-programming-languages-explained/)
54
54
55
55
## 1. What is web development?
56
56
57
57
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:
58
58
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)
60
60
61
61
## Web development vs. software development
62
62
@@ -71,7 +71,7 @@ The field of programming is broad. As a software developer (a general term for a
71
71
72
72
Read the following article to read more about different career paths:
73
73
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)
75
75
76
76
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 :)
77
77
@@ -91,8 +91,8 @@ This is the difference bteween `static` and `dynamic` sites: a static site alway
91
91
92
92
Read the following articles to learn more about this:
93
93
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)
96
96
97
97
## 3. What is JavaScript?
98
98
@@ -104,8 +104,8 @@ The main use for JavaScript is to make your webpage interactive: for example, if
104
104
105
105
Check the following resources to learn more about it:
106
106
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)
109
109
110
110
## 4. What are variables?
111
111
@@ -115,11 +115,11 @@ A variable is a piece of information that is saved. You give it a name that desc
115
115
116
116
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:
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.
125
125
@@ -142,9 +142,9 @@ A data type is a category of data. It tells the code interpreter what kind of da
142
142
143
143
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:
144
144
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)
148
148
149
149
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.
150
150
@@ -154,7 +154,7 @@ In JavaScript, the data types allow us to store various types of information, an
154
154
155
155
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:
156
156
157
-
-[Introduction to JavaScript Development](https://www.udemy.com/refactoru-intro-js)
157
+
-[Introduction to JavaScript Development](https://www.udemy.com/refactoru-intro-js)
-[FreeCodeCamp: Basic data structures](https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-data-structures)
16
16
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
-
23
17
## **2. JavaScript exercises**
24
18
25
19
> 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:
71
65
72
66
Keep track of which books you read and which books you want to read!
73
67
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).
75
69
2. Loop through the array of books.
76
70
3. For each book, log the book title and book author like so: "The Hobbit by J.R.R. Tolkien".
77
71
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
78
72
5. If you haven't read it log a string like `You still need to read "The Lord of the Rings"`
79
73
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.
83
77
84
-
**Array exercises!**
78
+
1. Declare a variable that holds an empty array, called `drinkTray`.
85
79
86
-
Consider the following array:
80
+
There are 3 different types of drinks:
87
81
88
82
```js
89
-
let favoriteAnimals= ["blowfish", "capricorn", "giraffe"];
83
+
constdrinkTypes= ["cola", "lemonade", "water"];
90
84
```
91
85
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.
173
87
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
175
89
176
90
## **3. Code along**
177
91
@@ -183,7 +97,7 @@ It's ok if you don't understand exactly what's happening here. Just follow along
183
97
184
98
**Project 1: Temperature Converter**
185
99
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!
187
101
188
102
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)
189
103
@@ -240,7 +154,7 @@ Good luck!
240
154
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:
241
155
242
156
1. JavaScript exercises
243
-
2. PROJECT:
157
+
2. PROJECT: Grade calculator
244
158
245
159
Upload both to your forked JavaScript1 repository in GitHub. Make a pull request to the original repository.
Copy file name to clipboardExpand all lines: Week3/MAKEME.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -142,14 +142,14 @@ If you have time left over and feel like you could go for more practice, try out
142
142
143
143
-[JavaScript30](https://javascript30.com/)
144
144
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!
146
146
147
147
## **SUBMIT YOUR HOMEWORK!**
148
148
149
149
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:
150
150
151
151
1. JavaScript exercises
152
-
2. PROJECT: Grade calculator
152
+
2. PROJECT: Credit card validator
153
153
154
154
Upload both to your forked JavaScript1 repository in GitHub. Make a pull request to the original repository.
0 commit comments