Skip to content

Commit

Permalink
Complete Day 4 contents
Browse files Browse the repository at this point in the history
adds package.json, licence, test
  • Loading branch information
Jaxolotl committed Sep 12, 2019
1 parent f9d6e6d commit 6d4bcf3
Show file tree
Hide file tree
Showing 8 changed files with 8,789 additions and 10 deletions.
15 changes: 15 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": "3.0.0"
}
]
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-class-properties"
]
}
12 changes: 12 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": ["@jaxolotl/eslint-config-wdc-es6"]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
coverage
31 changes: 21 additions & 10 deletions day_04.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@

- Indexed and Keyed Collections
- Collections family
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array>
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays>
- <https://github.com/Jaxolotl-Didactic-Lab/useful-info/blob/develop/array.md>
- <https://github.com/getify/You-Dont-Know-JS/blob/master/types%20%26%20grammar/ch3.md#array>
- Regular and typed arrays <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Indexed_collections_Arrays_and_typed_Arrays>
- .. good practices
- Array Built in methods
- <https://github.com/Jaxolotl-Didactic-Lab/useful-info/blob/develop/array.md>
- <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#Object_literals>
- .. good practices
- The Array Object
- Syntax
- Array Built-in methods
- Preliminary practice
- Exercises

### Collections family

Expand Down Expand Up @@ -114,3 +109,19 @@ Methods hierarchy
> They provide a way to walk through the entries of an array, some of them accept a callback. Technically they don't modify the original array unless you explicitly define that behavior on the callback.
Aaaand, we have all built-in methods Objects have.

### Preliminary Practice

Now let's have some time to practice creating, accessing, mutating, copying, iterating, merging arrays and entries.

Here a list of resources we can use:

- [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

Let's open our test file [here](/src/day_4/arrays.test.js)
Now open your terminal, make sure your 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 ;)
19 changes: 19 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"verbose": true,
"testRegex": "(/src/.*|(\\.|/))test.js?$",
"transformIgnorePatterns": [
"node_modules/(?!@jaxolotl)"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"/.git/"
],
"coverageThreshold": {
"global": {
"branches": 50,
"functions": 50,
"lines": 50,
"statements": 50
}
}
}
Loading

0 comments on commit 6d4bcf3

Please sign in to comment.