Created
April 18, 2019 09:02
-
-
Save dirkarnez/e46af288a9613367612d3c82c9c84ec6 to your computer and use it in GitHub Desktop.
Mask a string with asterisks
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
| functiob mask(str, start) { | |
| return str.split("").map((v, i) => i >= start ? "*" :v).join(""); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment