Created
December 31, 2025 17:43
-
-
Save gunlinux/c64863790f854c1c1b9b0418c27a78ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // BEGIN (write your solution here) | |
| const makeItFunny = (str, n) => { | |
| let i = 0; | |
| let out = ''; | |
| while (i < str.length) { | |
| if (i % n === 0) { | |
| out = `${out}${str[i].toUpperCase()}` | |
| } else { | |
| out = `${out}${str[i].toLowerCase()}` | |
| } | |
| i++; | |
| } | |
| return out; | |
| } | |
| // END | |
| export default makeItFunny |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment