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...`); } }