Skip to content

Instantly share code, notes, and snippets.

@dirkarnez
Created April 18, 2019 09:02
Show Gist options
  • Select an option

  • Save dirkarnez/e46af288a9613367612d3c82c9c84ec6 to your computer and use it in GitHub Desktop.

Select an option

Save dirkarnez/e46af288a9613367612d3c82c9c84ec6 to your computer and use it in GitHub Desktop.
Mask a string with asterisks
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