Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(num) {
- let percentages = `%`.repeat(num / 10);
- let dotts = `.`.repeat(10 - num / 10);
- if (num === 100) {
- console.log(`${num}% Complete!`);
- console.log(`[${percentages}]`);
- } else {
- console.log(`${num}% [${percentages}${dotts}]`);
- console.log(`Still loading...`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment