From dbea41517662b11908b998562b287ecd63595619 Mon Sep 17 00:00:00 2001 From: Clement Denis Date: Wed, 10 Jun 2020 20:36:38 +0200 Subject: [PATCH] fixup! Add AI, index and review subject for Tron --- subjects/abs.en.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 subjects/abs.en.md diff --git a/subjects/abs.en.md b/subjects/abs.en.md new file mode 100644 index 00000000..59966501 --- /dev/null +++ b/subjects/abs.en.md @@ -0,0 +1,27 @@ +## Abs + +### Instructions + +Create a `isPositive` function that takes a number as +parameter and return true if the given number is +stricly positive, or false otherwise + +Create the `abs` function that takes one number argument +and returns its absolute value. +You are not allowed to use `Math.abs`, make your own. + + +### Notions + +- [nan-academy.github.io/js-training/examples/functions.js](https://nan-academy.github.io/js-training/examples/functions.js) +- [nan-academy.github.io/js-training/examples/ternary.js](https://nan-academy.github.io/js-training/examples/ternary.js) +- [devdocs.io/javascript/global_objects/math/abs](https://devdocs.io/javascript/global_objects/math/abs) + + +### Code provided + +> all code provided will be added to your solution and doesn't need to be submited. + +```js +Math.abs = undefined +```