Advertisement
Guest User

Untitled

a guest
Feb 15th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function loadingBar(num){
  2.  
  3.   let procent = "%";
  4.   let points =".";
  5.     let procentSymbols = num / 10;
  6.     if(num !== 100){
  7.       console.log(`${num}% [${procent.repeat(procentSymbols)}${points.repeat(10-procentSymbols)}]`)
  8.       console.log("Still loading...")
  9.  
  10.     }else{
  11.       console.log(`${num}% Complete!`)
  12.       console.log(`[${procent.repeat(procentSymbols)}]`)
  13.     }
  14.  
  15. }
  16. loadingBar(100)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement