https://github.com/dalmia007/Nobody-Cares-What-The-Repo-Is-Called.git
Fork this repo and then git clone
your forked repo to your computer.
Once you're happy with your solution, git push
and submit a pull request at
https://github.com/dalmia007/Nobody-Cares-What-The-Repo-Is-Called.git
.
Figure out the pattern used to add the dash ('-') to the numbers by looking at the test and write a function for it. IMPORTANT: The resulting string cannot begin or end with a dash ('-'). GOOD LUCK!👍
dash(274) // returns "2-7-4"
dash(5311) //returns "5-3-1-1"
Refer to Test for More Examples
To test your solution, run npm i
in the root directory
and then run npm t
to run the automated tests.
To submit your solution:
- If you're working on a forked repo, push your changes to your forked repo and submit a pull request to this repo.