← Back to challenges

Mystery Challenge

JavaScriptHardalgorithmsloops

Instructions

Write a function that takes an integer n and turns it into the ouput. No further instructions.

Examples

mysteryFunc(521) ➞ "151211"

mysteryFunc(5211255) ➞ "1512211225"

mysteryFunc(513515) ➞ "151113151115"

Notes

  • The result has to do with counting something.
  • Check the Tests tab for some extra hints.
javascript
Loading editor…
to run
Walks through the solution with reasoning and edge cases.