Skip to content

Instantly share code, notes, and snippets.

@alecperkins
Forked from bnb/names.js
Last active August 29, 2015 14:06
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 alecperkins/d26741ed5fb7eb07e42c to your computer and use it in GitHub Desktop.
Save alecperkins/d26741ed5fb7eb07e42c to your computer and use it in GitHub Desktop.
Use Array::shift and Array::push to cycle through the names indefinitely.
var names = [
"&!",
"bnb",
"bang",
"bitnb",
"bitandbang",
"Tierney Coren"
]
while(names.length > 0){
var name = names.shift();
names.push(name);
$('.title')
.typetype(
"I am " + name + ".",
{
e: 0.04, // error rate. (use e=0 for perfect typing)
t: 100, // interval between keypresses
})
.backspace(
name.length + 1,
{
t: 100 // interval between keypresses
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment