Skip to content

Commit 234b470

Browse files
author
Luca Sartori
committed
Some Exercises Added
1 parent 588209c commit 234b470

File tree

8 files changed

+162
-5
lines changed

8 files changed

+162
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ case, it is recommended to take a look to the following topics:
111111

112112
Each day of the first week you will have a small exercise at the end of the day.
113113
You must code the exercise inside the corresponding folder, example
114-
src/week1/day1/index.js will contain the code for the exercise of the Day 1.
114+
`src/week1/day1/index.js` will contain the code for the exercise of the Day 1.
115115

116116
The second week introduces you to TypeScript and Angular. JavaScript is an easy typed language, that means
117117
as a developer you have total control over the whole structure of the code. Sometimes that's
@@ -191,7 +191,7 @@ In this lesson you will learn all about the Prototype, Inheritance, Getters, Set
191191

192192
### Exercise:
193193

194-
**Notes:**
194+
Look into [`src/week1/day1/index.html`](src/week1/day1/index.html) in there there's an `Animal` class with a talk method. Follow the instructions.
195195

196196
### ~~Not So~~ Optional Reading
197197
Since ES6 went out we do have a _Class like_ sintax, **HOWEVER** that's [Syntactic Sugar](https://en.wikipedia.org/wiki/Syntactic_sugar).
@@ -214,12 +214,11 @@ Read up and catch 'em all
214214
- [Errors and debugging](http://eloquentjavascript.net/08_error.html)
215215

216216
### Exercise:
217-
218-
**Notes:**
217+
Look into [`src/week1/day2`](src/week1/day2) in there there're some `index` files, poke around and follow the instructions.
219218

220219
## Day 3: The browser, where the _magic_ happens
221220

222-
So, you have a text file called _whatever.js_, you have ~200 lines in there (or you should, codebases of ~ 1k lines are made by horrible people). You double click the file, an browser opens and
221+
So, you have a text file called _whatever.js_, you have ~200 lines in there (or you should, codebases of ~ 1k lines are made by horrible people). You add it to an `index.html` file, double click that file, a browser opens and
223222

224223
![Mindblown](assets/mindblown.gif)
225224

@@ -251,6 +250,7 @@ Users communicate with the application via `forms`, those are fill up sections w
251250

252251

253252
### Exercise:
253+
Look into [`src/week1/day3`](src/week1/day3) in there there're some `index` files, poke around and follow the instructions.
254254

255255
## Day 4 and 5: require('Node.js')
256256
So, at this point you pretty much are up to speed with Js. But Js does not only run on a

src/week1/day1/index.html

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!-- Take this file and open it on a browser, then open the console
2+
inside developer tools -->
3+
<script>
4+
var Animal = (function(type) {
5+
this.type = type;
6+
});
7+
8+
Animal.prototype.talk = function() {
9+
console.log(`Hi, I'm an Animal, but also a ${this.type}`);
10+
};
11+
12+
let rabbit = new Animal("Rabbit");
13+
rabbit.talk();
14+
</script>
15+
16+
<!-- Now it's your turn to make some changes
17+
- Refactor the previous code to use getters and settters
18+
- Add at least 2 more properties
19+
- Add at least 2 more methods
20+
- Create a new class that inherits from Animal
21+
- Override one of the methods you previously defined
22+
23+
****************************************************
24+
**** BONUS POINTS ****
25+
**** MAKE A 2nd VERSION USING ES6 CLASSES ****
26+
**** ****
27+
****************************************************
28+
-->

src/week1/day2/indexErrors.html

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!-- Take this file and open it on a browser, then open the console
2+
inside developer tools -->
3+
<script>
4+
(function(){
5+
"use strict";
6+
var willPass = "Hi there";
7+
wontPass = "nope";
8+
9+
console.log(`willPass = ${willPass}`);
10+
console.log(`wontPass = ${wontPass}`);
11+
12+
let someArr = [1, 2, 3, 4];
13+
14+
function giveMe(inx) {
15+
return someArr[counter];
16+
}
17+
18+
for (let counter= 0; counter <= someArr.length; counter++) {
19+
console.log(`Index = ${counter}, value = ${giveMe(counter)}`);
20+
}
21+
22+
console.log("The code continues");
23+
})()
24+
</script>
25+
26+
<!-- Now it's your turn to make some changes
27+
- Refactor the previous code to make it work
28+
- Add some kind of failsafe to never get an undefined while accessing the array
29+
- Do an Assertion
30+
31+
****************************************************
32+
**** BONUS POINTS ****
33+
**** Investigate about other console methods ****
34+
**** and give me some kind of demo ****
35+
****************************************************
36+
-->

src/week1/day2/indexRegex.html

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!-- Take this file and open it on a browser, then open the console
2+
inside developer tools -->
3+
<script>
4+
(function(){
5+
"use strict";
6+
// This will always pass
7+
var emailRegex = new RegExp(),
8+
result = prompt("Enter Your email", ""),
9+
valid = result.match(emailRegex);
10+
11+
if (valid) {
12+
alert("Email valid");
13+
console.log(`You entered: ${result}`);
14+
} else {
15+
alert("Email not valid");
16+
console.warn(`You entered: ${result} which is not an email`);
17+
}
18+
})()
19+
</script>
20+
21+
<!-- Now it's your turn to make some changes
22+
- Make a proper regex so the code works as expected
23+
24+
****************************************************
25+
**** BONUS POINTS ****
26+
**** Show me something funny with a regex ****
27+
**** use your imagination ****
28+
****************************************************
29+
-->

src/week1/day3/indexDOM.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Take this file and open it on a browser, then open the console
2+
inside developer tools -->
3+
<script>
4+
(function(){
5+
"use strict";
6+
})()
7+
</script>
8+
9+
<!-- Now it's your turn to make some changes
10+
- Add at least 2 DOM elements, via code, DOH
11+
- Make a button, ask a quantity and add those elements
12+
13+
****************************************************
14+
**** BONUS POINTS ****
15+
**** Keep it funny, make a list, do a drawing ****
16+
**** show me you can dominate the DOM ****
17+
****************************************************
18+
-->

src/week1/day3/indexEvents.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Take this file and open it on a browser, then open the console
2+
inside developer tools -->
3+
<script>
4+
(function(){
5+
"use strict";
6+
})()
7+
</script>
8+
9+
<!-- Now it's your turn to make some changes
10+
- Draw some buttons, make your way between the click events and let me know they are pressed
11+
- What other events are you familiar with? Show it
12+
13+
****************************************************
14+
**** BONUS POINTS ****
15+
**** keep me informed of the pointer's ****
16+
**** position, make it show on screen ****
17+
****************************************************
18+
-->

src/week1/day4-5/index.js

Whitespace-only changes.

src/week1/day4-5/package.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "globant-ui-bootcamps-2018",
3+
"version": "1.0.0",
4+
"description": "Bootcamp's course for UI oriented developers",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/lsartori94/globant-bootcamps-ui.git"
12+
},
13+
"keywords": [
14+
"Globant",
15+
"Bootcamp",
16+
"UI",
17+
"Javascript",
18+
"Angular",
19+
"Node",
20+
"Typescript"
21+
],
22+
"author": "Luca Sartori",
23+
"license": "ISC",
24+
"bugs": {
25+
"url": "https://github.com/lsartori94/globant-bootcamps-ui/issues"
26+
},
27+
"homepage": "https://github.com/lsartori94/globant-bootcamps-ui#readme"
28+
}

0 commit comments

Comments
 (0)