Last active
December 14, 2017 11:34
-
-
Save vsnikkil/f0fd7788a6f08454e905a0ba5469b537 to your computer and use it in GitHub Desktop.
try-me
This file contains hidden or 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
const a = (idx = 1, color = 'black') => { console.log(`%c ${ [...new Array(Math.round(50*(1+Math.sin(idx/10))))].map(() => '*').join('') }`, `color: ${color}`); setTimeout(() => a(idx+1, color), 20) }; a() | |
// Node | |
var x = idx => { console.log(''.padStart(Math.floor(process.stdout.columns / 2 * (1 + Math.sin(idx))), '*')); setTimeout(() => x((idx + 0.1) % (2 * Math.PI)), 20) }; x(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment