Skip to content

Commit

Permalink
complete day 6 contents
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaxolotl committed Sep 19, 2019
1 parent 87a8233 commit 28ba967
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 30 deletions.
3 changes: 2 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"MD013": false,
"MD026": false,
"MD028": false
"MD028": false,
"MD036": false
}
60 changes: 42 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,32 +94,56 @@ A lot of information has been written about JavaScript and EcmaScript since both
- Introduce **iterable** concept, Iteration protocols
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols>
- .. good practices
- DAY 6
- [DAY 6](/day_06.md)
- Functions
- <https://www.ecma-international.org/ecma-262/6.0/#sec-function-definitions>
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions>
- <https://github.com/Jaxolotl-Didactic-Lab/useful-info/blob/develop/functions%20-%20generators%20-%20scope%20-%20closure.md>
- First-Class Citizens
- ..
- .. good practices
- General Definition
- Function declaration (function statement)
- Function expression
- Function constructor
- Constructor vs declaration vs expression
- Properties of the Function object in the prototype chain
- Arity & formal parameters
- Formal parameters and the `arguments` thing
- Functions as properties of an object
- IIFE
- Pure functions
- Side Effects
- Execution context
- <https://github.com/Jaxolotl-Didactic-Lab/useful-info/blob/develop/execution-context.md>
- ...
- .. good practices
- Types of Execution Context (executable code)
- Execution Stack
- How Execution Context is defined?
- Articles and books used for this section
- Scope
- <https://github.com/Jaxolotl-Didactic-Lab/useful-info/blob/develop/scope.md>
- ES5 hoisting
- .. good practices
- Part of a program
- ECMAScript definition
- General definitions
- Examples
- Hoisting
- Closure
- General definition
- Examples
- Can we Cheat Scope?
- ev[a|i]l
- with
- Relative Concepts Readings
- Preliminary practice
- Exercises
- DAY 7
- `this` Keyword
- <https://github.com/getify/You-Dont-Know-JS/blob/master/this%20%26%20object%20prototypes/ch1.md>
- <https://github.com/getify/You-Dont-Know-JS/blob/master/this%20%26%20object%20prototypes/ch2.md>
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this>
- BIND
- APPLY
- CALL
- Strict mode
- What happens on strict mode?
- Semantic Differences
- Arrow Functions
- ...
- ...
- .. good practices
- Closure
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures>
- IIFE
- .. good practices
- Generators & Iterators
- Generators
- ..
- ..
- .. good practices
Expand Down
27 changes: 18 additions & 9 deletions day_06.md
Original file line number Diff line number Diff line change
Expand Up @@ -739,16 +739,25 @@ with (Math){x = cos(2)};

### Preliminary Practice

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

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

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

### Exercises
Let's open our test files:

Let's open our test file [here](/src/day_4/arrays.test.js)
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.
Our task is to make ALL our DAY 4 tests pass ;)
- [Functions](/src/day_06/functions.test.js)
- [Scope](/src/day_06/scope.test.js)
- [Hoisting](/src/day_06/hoisting.test.js)
- [Closure](/src/day_06/closure.test.js)

Now open your terminal.

1. Make sure you're at the project location
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.
3. Type `npm run test:watch`, this will start running your tests every time you make a change.

**Our task is to make ALL our DAY 6 tests pass ;)**
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "a-walk-in-javascript",
"version": "1.0.0",
"version": "1.2.0",
"description": "A day by day walk through the basics of javascript assisted with notes, exercises and references to the most significant resources online",
"main": "''",
"scripts": {
Expand Down
Empty file added src/day_06/closure.test.js
Empty file.
Empty file added src/day_06/functions.test.js
Empty file.
Empty file added src/day_06/hoisting.test.js
Empty file.
Empty file added src/day_06/scope.test.js
Empty file.

0 comments on commit 28ba967

Please sign in to comment.