Skip to content

Instantly share code, notes, and snippets.

@trknhr
Last active December 30, 2021 02:46
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save trknhr/6b186886cce79479e4c1f72f578a175d to your computer and use it in GitHub Desktop.
Save trknhr/6b186886cce79479e4c1f72f578a175d to your computer and use it in GitHub Desktop.
const STR_LEN = 80
const SUSHI_INTERVAL =10
let cnt = 0;
function sushiDraw(){
const sa = new Array(STR_LEN).fill(' ')
for(let i = 0; i < STR_LEN; i += SUSHI_INTERVAL){
const sushiIndex = sa.length - 1 - (cnt + i) % sa.length
sa.splice(sushiIndex, 1, '🍣')
}
console.clear()
console.log(sa.join(''))
cnt++
}
setInterval(sushiDraw, 1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment