diff --git a/subjects/abs.en.md b/subjects/abs.en.md index 029eac22..59966501 100644 --- a/subjects/abs.en.md +++ b/subjects/abs.en.md @@ -19,6 +19,9 @@ You are not allowed to use `Math.abs`, make your own. ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Math.abs = undefined ``` diff --git a/subjects/all.en.md b/subjects/all.en.md index a355b03a..2f280c0b 100644 --- a/subjects/all.en.md +++ b/subjects/all.en.md @@ -13,6 +13,9 @@ Create a function `all` that works like `Promise.all` but with objects. ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Promise.all = undefined ``` diff --git a/subjects/block-chain.en.md b/subjects/block-chain.en.md index a5e5e392..ca63cadd 100644 --- a/subjects/block-chain.en.md +++ b/subjects/block-chain.en.md @@ -56,6 +56,8 @@ console.log(fork.index) // -> 5 ### Code provided +> all code provided will be added to your solution and doesn't need to be submited. + ```js const hashCode = str => ( diff --git a/subjects/change.en.md b/subjects/change.en.md index 91801c5a..29025a97 100644 --- a/subjects/change.en.md +++ b/subjects/change.en.md @@ -20,6 +20,9 @@ Create 2 functions: ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js const sourceObject = { num: 42, diff --git a/subjects/curry-entries.en.md b/subjects/curry-entries.en.md index 829151e8..d3df0483 100644 --- a/subjects/curry-entries.en.md +++ b/subjects/curry-entries.en.md @@ -33,6 +33,9 @@ You will also have to create for each curry function the following: ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js // prettier-ignore const personnel = { diff --git a/subjects/cut-corners.en.md b/subjects/cut-corners.en.md index bea28c2d..4e69d35f 100644 --- a/subjects/cut-corners.en.md +++ b/subjects/cut-corners.en.md @@ -19,6 +19,9 @@ Some restrictions apply: ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Math.round = Math.ceil = Math.floor = Math.trunc = undefined ``` diff --git a/subjects/elementary.en.md b/subjects/elementary.en.md index 83edc0df..158dde88 100644 --- a/subjects/elementary.en.md +++ b/subjects/elementary.en.md @@ -10,6 +10,9 @@ Create 3 functions: > functions should have (a, b) as arguments ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Math.imul = undefined ``` diff --git a/subjects/filter.en.md b/subjects/filter.en.md index 515b2e7c..b88eb3be 100644 --- a/subjects/filter.en.md +++ b/subjects/filter.en.md @@ -20,6 +20,9 @@ and that works like the partition function from lodash. ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Array.prototype.filter = undefined ``` diff --git a/subjects/find-expression.en.md b/subjects/find-expression.en.md index 1de4e304..6579a5ce 100644 --- a/subjects/find-expression.en.md +++ b/subjects/find-expression.en.md @@ -21,6 +21,9 @@ It will look something like this `1 *2 *2 +4` ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js const add4 = '+4' const mul2 = '*2' diff --git a/subjects/flat.en.md b/subjects/flat.en.md index 1fcc82b7..4b4a0bd4 100644 --- a/subjects/flat.en.md +++ b/subjects/flat.en.md @@ -11,6 +11,9 @@ Create the `flat` functions that works like the `.flat` array method ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Array.prototype.flat = undefined ``` diff --git a/subjects/for-each.en.md b/subjects/for-each.en.md index 276660e6..7d32db5a 100644 --- a/subjects/for-each.en.md +++ b/subjects/for-each.en.md @@ -12,6 +12,9 @@ and that works like the method .forEach ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Array.prototype.forEach = undefined ``` diff --git a/subjects/gougle-search.en.md b/subjects/gougle-search.en.md index aee8808f..fd9bc1fb 100644 --- a/subjects/gougle-search.en.md +++ b/subjects/gougle-search.en.md @@ -36,6 +36,9 @@ using a the server name as key. ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js // fake `getJSON` function let getJSON = async (url) => url diff --git a/subjects/index-of.en.md b/subjects/index-of.en.md index bbd5ebb6..955de540 100644 --- a/subjects/index-of.en.md +++ b/subjects/index-of.en.md @@ -22,6 +22,9 @@ Create 3 functions: ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Array.prototype.indexOf = undefined Array.prototype.lastIndexOf = undefined diff --git a/subjects/is-winner.en.md b/subjects/is-winner.en.md index b230e8d2..9f276007 100644 --- a/subjects/is-winner.en.md +++ b/subjects/is-winner.en.md @@ -24,6 +24,9 @@ displayed like : '1000, 1004, 1008'. The same goes for the results ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js const db = (() => { //countries that won the FIFA World Cup diff --git a/subjects/is.en.md b/subjects/is.en.md index fdb1a95e..abb46188 100644 --- a/subjects/is.en.md +++ b/subjects/is.en.md @@ -2,7 +2,7 @@ ### Instructions -Add new function properties to the object `is`` to check a value type +Add new function properties to the object `is` to check a value type - `is.num` value is a number - `is.nan` value is NaN - `is.str` value is a string @@ -25,6 +25,9 @@ Add new function properties to the object `is`` to check a value type ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js const is = {} ``` diff --git a/subjects/manipulate-entries.en.md b/subjects/manipulate-entries.en.md index 653df129..db01ba78 100644 --- a/subjects/manipulate-entries.en.md +++ b/subjects/manipulate-entries.en.md @@ -25,6 +25,9 @@ Create 3 other functions that use your previously create functions: ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js // small database with nutrition facts, per 100 grams // prettier-ignore diff --git a/subjects/manipulate-keys.en.md b/subjects/manipulate-keys.en.md index d93fe2ee..8c6fd192 100644 --- a/subjects/manipulate-keys.en.md +++ b/subjects/manipulate-keys.en.md @@ -20,6 +20,9 @@ Create 3 functions that works like the `.filter`, `.map` and `.reduce` array met ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js // small database with nutrition facts, per 100 grams // prettier-ignore diff --git a/subjects/manipulate-values.en.md b/subjects/manipulate-values.en.md index c3988e52..ffcb5e30 100644 --- a/subjects/manipulate-values.en.md +++ b/subjects/manipulate-values.en.md @@ -24,6 +24,9 @@ You will have a small database to help you with the groceries. ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js // small database with nutrition facts, per 100 grams // prettier-ignore diff --git a/subjects/mapper.en.md b/subjects/mapper.en.md index a92bf7a6..7e763fee 100644 --- a/subjects/mapper.en.md +++ b/subjects/mapper.en.md @@ -16,6 +16,9 @@ and that works like the method .flatMap ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Array.prototype.map = undefined Array.prototype.flatMap = undefined diff --git a/subjects/min-max.en.md b/subjects/min-max.en.md index dcc0d3fd..d64308b9 100644 --- a/subjects/min-max.en.md +++ b/subjects/min-max.en.md @@ -22,6 +22,9 @@ and returns the lowest ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Math.min = Math.max = undefined ``` diff --git a/subjects/mutability.en.md b/subjects/mutability.en.md index 5b3d417f..50010cb1 100644 --- a/subjects/mutability.en.md +++ b/subjects/mutability.en.md @@ -1,29 +1,31 @@ -## Mutability - -### Instructions - -Create a copy of the person object called clone1. -Create an other copy of the person object called clone2. - -Create a new variable `samePerson` with the same value as `person`. - -Increase by one the property age of `person` -and set his contry to `'FR'`. - - -### Notions - -- [nan-academy.github.io/js-training/examples/set.js](https://nan-academy.github.io/js-training/examples/set.js) -- [nan-academy.github.io/js-training/examples/get.js](https://nan-academy.github.io/js-training/examples/get.js) -- [nan-academy.github.io/js-training/examples/data-structures.js](https://nan-academy.github.io/js-training/examples/data-structures.js) - - -### Code provided -this code does not need to be sent for verification -```js -const person = { - name: 'Rick', - age: 77, - country: 'US', -} -``` +## Mutability + +### Instructions + +Create a copy of the person object called clone1. +Create an other copy of the person object called clone2. + +Create a new variable `samePerson` with the same value as `person`. + +Increase by one the property age of `person` +and set his contry to `'FR'`. + + +### Notions + +- [nan-academy.github.io/js-training/examples/set.js](https://nan-academy.github.io/js-training/examples/set.js) +- [nan-academy.github.io/js-training/examples/get.js](https://nan-academy.github.io/js-training/examples/get.js) +- [nan-academy.github.io/js-training/examples/data-structures.js](https://nan-academy.github.io/js-training/examples/data-structures.js) + + +### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + +```js +const person = { + name: 'Rick', + age: 77, + country: 'US', +} +``` diff --git a/subjects/nasa.en.md b/subjects/nasa.en.md index d7215d4d..b6782a22 100644 --- a/subjects/nasa.en.md +++ b/subjects/nasa.en.md @@ -2,13 +2,10 @@ ### Instructions -Create a `nasa` function that takes a number as parameter and returns all -numbers from 1 to the number passed as parameter, with three exception. - +Create a `nasa` function that takes a number `N` as a parameter and returns +a string with all numbers from 1 to the `N` separated by whitespace, with three exceptions: - For numbers divisible by 3, add 'NA'. - - For numbers divisible by 5, add 'SA'. - - For the number that are divisible by 3 and 5 add 'NASA'. diff --git a/subjects/pyramid.en.md b/subjects/pyramid.en.md index 2c429583..31bf63d2 100644 --- a/subjects/pyramid.en.md +++ b/subjects/pyramid.en.md @@ -10,14 +10,16 @@ Just like triangle ### Output example -- '*' character and depth of 5 : +- `*` character and depth of 5 : +``` * *** ***** ******* ********* - +``` +> No new line in last line ### Notions diff --git a/subjects/quantifiers.en.md b/subjects/quantifiers.en.md index 0515ca4e..ef676d7a 100644 --- a/subjects/quantifiers.en.md +++ b/subjects/quantifiers.en.md @@ -21,6 +21,9 @@ The use of `[].every` and `[].some` is forbidden for this exercise. ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Array.prototype.some = Array.prototype.every = undefined ``` diff --git a/subjects/race.en.md b/subjects/race.en.md index 2f8f842f..a87e619b 100644 --- a/subjects/race.en.md +++ b/subjects/race.en.md @@ -16,6 +16,9 @@ and a number and return the first resolved values up to the number given. ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Promise.race = undefined ``` diff --git a/subjects/reduce.en.md b/subjects/reduce.en.md index 720b26d2..ce42a1a0 100644 --- a/subjects/reduce.en.md +++ b/subjects/reduce.en.md @@ -35,6 +35,9 @@ The use of `[].reduce` and `[].reduceRight` is forbidden for this exercise. ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Array.prototype.reduce = undefined Array.prototype.reduceRight = undefined diff --git a/subjects/repeat.en.md b/subjects/repeat.en.md index 6de97f99..45740c19 100644 --- a/subjects/repeat.en.md +++ b/subjects/repeat.en.md @@ -16,6 +16,9 @@ Of course you may not use the method directly ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js String.prototype.repeat = undefined ``` diff --git a/subjects/reverser.en.md b/subjects/reverser.en.md index 6cff5953..e817017f 100644 --- a/subjects/reverser.en.md +++ b/subjects/reverser.en.md @@ -13,6 +13,9 @@ Like `[].reverse()` but working also for strings (without using the actual metho ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Array.prototype.reverse = undefined ``` diff --git a/subjects/sign.en.md b/subjects/sign.en.md index 2c9b752c..3eff66a5 100644 --- a/subjects/sign.en.md +++ b/subjects/sign.en.md @@ -19,6 +19,9 @@ if they both have the same sign ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Math.sign = undefined ``` diff --git a/subjects/slicer.en.md b/subjects/slicer.en.md index f0bf798c..ff3d2a96 100644 --- a/subjects/slicer.en.md +++ b/subjects/slicer.en.md @@ -13,6 +13,9 @@ It takes an additional first argument which is the string or the array ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js Array.prototype.slice = undefined String.prototype.slice = undefined diff --git a/subjects/triangle.en.md b/subjects/triangle.en.md index 250cdc79..1d8c4a1d 100644 --- a/subjects/triangle.en.md +++ b/subjects/triangle.en.md @@ -8,14 +8,16 @@ of the number passed as argument. ### Output example -- '*' character and depth of 5 : +- `*` character and depth of 5: +``` * ** *** **** ***** - +``` +> No new line in last line ### Notions diff --git a/subjects/unbreakable.en.md b/subjects/unbreakable.en.md index 268bfdf0..9a5e05ed 100644 --- a/subjects/unbreakable.en.md +++ b/subjects/unbreakable.en.md @@ -17,6 +17,9 @@ Implement 2 functions: ### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + ```js String.prototype.split = undefined String.prototype.match = undefined