Skip to content

Instantly share code, notes, and snippets.

@MiguelMedeiros
Last active June 7, 2019 20:13
Show Gist options
  • Save MiguelMedeiros/69767282e3750c7ba7ea53e5d0189eba to your computer and use it in GitHub Desktop.
Save MiguelMedeiros/69767282e3750c7ba7ea53e5d0189eba to your computer and use it in GitHub Desktop.
GO HORSE CONSOLE!
let eyes = "xx";
$(document).ready(function() {
let textSpeech = "GO HOORRRSE!!11!!!!";
let count = 2;
setInterval(() => {
console.clear();
if (textSpeech.length >= count) {
initHorse(textSpeech.slice(0, count));
} else {
count = 2;
}
if (count % 4) {
eyes = "o0";
} else {
eyes = "0o";
}
count++;
}, 300);
});
function initHorse(text) {
let textUnderline = " ";
for (let index = 0; index < text.length; index++) {
textUnderline += "-";
}
console.log(
`%c
< ` +
text +
` >
` +
textUnderline +
`
\\ ^__^
\\ (` +
eyes +
`)\\_______
(__)\\ )\\/\\
||----, |
|| ||`,
"font-family:monospace"
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment