Skip to content

Commit 28ba967

Browse files
committed
complete day 6 contents
1 parent 87a8233 commit 28ba967

File tree

9 files changed

+64
-30
lines changed

9 files changed

+64
-30
lines changed

.markdownlint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"MD013": false,
33
"MD026": false,
4-
"MD028": false
4+
"MD028": false,
5+
"MD036": false
56
}

README.md

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,32 +94,56 @@ A lot of information has been written about JavaScript and EcmaScript since both
9494
- Introduce **iterable** concept, Iteration protocols
9595
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols>
9696
- .. good practices
97-
- DAY 6
97+
- [DAY 6](/day_06.md)
9898
- Functions
99-
- <https://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions>
100-
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions>
101-
- <https://github.com/Jaxolotl-Didactic-Lab/useful-info/blob/develop/functions%20-%20generators%20-%20scope%20-%20closure.md>
102-
- First-Class Citizens
103-
- ..
104-
- .. good practices
99+
- General Definition
100+
- Function declaration (function statement)
101+
- Function expression
102+
- Function constructor
103+
- Constructor vs declaration vs expression
104+
- Properties of the Function object in the prototype chain
105+
- Arity & formal parameters
106+
- Formal parameters and the `arguments` thing
107+
- Functions as properties of an object
108+
- IIFE
109+
- Pure functions
110+
- Side Effects
105111
- Execution context
106-
- <https://github.com/Jaxolotl-Didactic-Lab/useful-info/blob/develop/execution-context.md>
107-
- ...
108-
- .. good practices
112+
- Types of Execution Context (executable code)
113+
- Execution Stack
114+
- How Execution Context is defined?
115+
- Articles and books used for this section
109116
- Scope
110-
- <https://github.com/Jaxolotl-Didactic-Lab/useful-info/blob/develop/scope.md>
111-
- ES5 hoisting
112-
- .. good practices
117+
- Part of a program
118+
- ECMAScript definition
119+
- General definitions
120+
- Examples
121+
- Hoisting
122+
- Closure
123+
- General definition
124+
- Examples
125+
- Can we Cheat Scope?
126+
- ev[a|i]l
127+
- with
128+
- Relative Concepts Readings
129+
- Preliminary practice
130+
- Exercises
113131
- DAY 7
132+
- `this` Keyword
133+
- <https://github.com/getify/You-Dont-Know-JS/blob/master/this%20%26%20object%20prototypes/ch1.md>
134+
- <https://github.com/getify/You-Dont-Know-JS/blob/master/this%20%26%20object%20prototypes/ch2.md>
135+
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this>
136+
- BIND
137+
- APPLY
138+
- CALL
139+
- Strict mode
140+
- What happens on strict mode?
141+
- Semantic Differences
114142
- Arrow Functions
115143
- ...
116144
- ...
117145
- .. good practices
118-
- Closure
119-
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures>
120-
- IIFE
121-
- .. good practices
122-
- Generators & Iterators
146+
- Generators
123147
- ..
124148
- ..
125149
- .. good practices

day_06.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -739,16 +739,25 @@ with (Math){x = cos(2)};
739739

740740
### Preliminary Practice
741741

742-
Now let's have some time to practice creating, accessing, mutating, copying, iterating, merging arrays and entries.
742+
Now let's have some time to practice. Here a list of resources we can use:
743743

744-
Here a list of resources we can use:
744+
- [W3resources exercises](https://www.w3resource.com/javascript-exercises/javascript-functions-exercises.php)
745+
- [W3School](https://www.w3schools.com/js/js_functions.asp)
746+
- [W3School](https://www.w3schools.com/js/exercise_js.asp?filename=exercise_js_functions1)
745747

746-
- [MDN Array Examples](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#Examples)
747-
- [W3resources array exercises](https://www.w3resource.com/javascript-exercises/javascript-array-exercises.php)
748-
- [W3School](https://www.w3schools.com/js/js_arrays.asp)
748+
## Exercises
749749

750-
### Exercises
750+
Let's open our test files:
751751

752-
Let's open our test file [here](/src/day_4/arrays.test.js)
753-
Now open your terminal, make sure you're at the project location and type `npm run test:watch`, this will start running your tests every time you make a change.
754-
Our task is to make ALL our DAY 4 tests pass ;)
752+
- [Functions](/src/day_06/functions.test.js)
753+
- [Scope](/src/day_06/scope.test.js)
754+
- [Hoisting](/src/day_06/hoisting.test.js)
755+
- [Closure](/src/day_06/closure.test.js)
756+
757+
Now open your terminal.
758+
759+
1. Make sure you're at the project location
760+
2. If you didn't install all the packages yet the run `npm i` for a fresh dependency install, or `npm ci` for an installation based on the lock file.
761+
3. Type `npm run test:watch`, this will start running your tests every time you make a change.
762+
763+
**Our task is to make ALL our DAY 6 tests pass ;)**

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "a-walk-in-javascript",
3-
"version": "1.0.0",
3+
"version": "1.2.0",
44
"description": "A day by day walk through the basics of javascript assisted with notes, exercises and references to the most significant resources online",
55
"main": "''",
66
"scripts": {

src/day_06/closure.test.js

Whitespace-only changes.

src/day_06/functions.test.js

Whitespace-only changes.

src/day_06/hoisting.test.js

Whitespace-only changes.

src/day_06/scope.test.js

Whitespace-only changes.

0 commit comments

Comments
 (0)