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.

15 lines
535 B

## Nasa
### Instructions
Create a function named `nasa` that takes a number `N` as an argument and returns a string with all numbers from 1 to `N` separated by spaces. There are three exceptions:
- Convert numbers which are divisible by 3 to `"NA"`.
- Convert numbers which are divisible by 5 to `"SA"`.
- Convert numbers which are divisible by 3 *and* 5 to `"NASA"`.
### Notions
- [Loops](https://nan-academy.github.io/js-training/examples/loops.js)
- [Recursion](https://nan-academy.github.io/js-training/examples/recursion.js)