Skip to content

Instantly share code, notes, and snippets.

@dannycallaghan
Created October 3, 2013 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannycallaghan/6806771 to your computer and use it in GitHub Desktop.
Save dannycallaghan/6806771 to your computer and use it in GitHub Desktop.
Repeat a character (or set of characters) n times.
/* Repeat a character (or set of characters) n times */
var dashes = new Array( 21 ).join( '-' ); // Outputs 20 dashes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment