Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node js load animation

//Credits to Amadan on Stackoverflow
//https://stackoverflow.com/a/34848607/16386794
var twirlTimer = (function() {
  var P = ["", "|", "/", "-"];
  var x = 0;
  return setInterval(function() {
    process.stdout.write("
" + P[x++]);
    x &= 3;
  }, 250);
})();
 
PREVIOUS NEXT
Tagged: #node #js #load #animation
ADD COMMENT
Topic
Name
9+6 =