public/subjects/nasa/README.md

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