Skip to content

Instantly share code, notes, and snippets.

@myfreeer
Created April 6, 2017 09:05
Show Gist options
  • Save myfreeer/49a6e66831e6729722a3962da31a66e5 to your computer and use it in GitHub Desktop.
Save myfreeer/49a6e66831e6729722a3962da31a66e5 to your computer and use it in GitHub Desktop.
const repeat = (str, times) => {
let result = '';
while (times-- > 0) result += str;
return result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment