Skip to content

Instantly share code, notes, and snippets.

@zaftzaft
Created March 24, 2015 14:01
Show Gist options
  • Save zaftzaft/4006f19025bf83362225 to your computer and use it in GitHub Desktop.
Save zaftzaft/4006f19025bf83362225 to your computer and use it in GitHub Desktop.
➫ ➬ ➭ ➮ ➯ ➩ ➪ ➫ ➬ ➭ 矢印大回転の巻
//var i = 0x27a9, l = 0x27af, c = i;
//(function f(){
// process.stdout.write("\r" + String.fromCharCode(
// l<=c?(c=i):++c
// ));
//
// setTimeout(f, 100);
//})();
var next = (function(){
var i = 0x27a9, l = 0x27af, c = i;
return function(){
return String.fromCharCode(l<=c?(c=i):++c);
};
})();
var a = [];
for(var i = 10;i--;){
a.push(next());
}
(function f(){
a.shift();
a.push(next());
process.stdout.write("\r" + a.join(" "));
setTimeout(f, 100);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment