Skip to content

Instantly share code, notes, and snippets.

@artpar
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save artpar/4d8ff15d30dbf069c90b to your computer and use it in GitHub Desktop.

Select an option

Save artpar/4d8ff15d30dbf069c90b to your computer and use it in GitHub Desktop.
generate random text to be used for typing practice
// choose the characters based on the fingers you want to practice
var chars = "12qwaszx90opl;..c,dk'-=[]!@()_+{}\">?QWASZXOPL>".split("");
function rand(a) {
return a[Math.floor(Math.random() * a.length)]
}
var str = "";
for (var i=0; i<600;i++) {
str += rand(chars);
if (i % 6==0){str += " \n";
}
};
console.log(str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment