You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
830 B

5 years ago
## Keep Cut
### Instructions
Create the `cutFirst` function that takes a string
and remove the 2 first characters.
Create the `cutLast` function that takes a string
and remove the 2 last characters.
Create the `cutFirstLast` function that takes a string as parameter
and remove the 2 first characters and 2 last characters.
Create a `keepFirst` function that takes a string as parameter
and return the string only keeping the 2 first characters.
Create a `keepLast` function that takes a string as parameter
and return the string only keeping the 2 last characters.
Create a `keepFirstLast` function that takes a string as parameter
and only keep 2 first characters and 2 last characters.
### Notions
- [https://devdocs.io/javascript/global_objects/array/slice](https://devdocs.io/javascript/global_objects/array/slice)