Last active
June 7, 2019 20:13
-
-
Save MiguelMedeiros/69767282e3750c7ba7ea53e5d0189eba to your computer and use it in GitHub Desktop.
GO HORSE CONSOLE!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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