Advertisement
Spocoman

09. Loading Bar

Jan 28th, 2022
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve (num) {
  2.  
  3.     console.log(num === 100 ? '100% Complete!'
  4.         :`${num}% [${'%'.repeat(Math.floor(num / 10)) + '.'.repeat(10 - Math.floor(num / 10))}]\nStill loading...`);
  5.  
  6. }
  7.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement