function loadingBar(num) {
  let percentage = num;

  let howManyToReplace = num / 10;
  let percN = '%'.repeat(howManyToReplace);
  let dotN = '.'.repeat(10 - howManyToReplace);
  
  if (percentage === 100) {
      console.log('100% Complete!');
      console.log(percN);
  } else {
      console.log(`${percentage}% [${percN}${dotN}]`);
      console.log('Still loading...');
  }
}
// Your task is to create a function that visualizes a loading bar depending on that number you have received in the input.
Your task is to create a function that visualizes a loading bar depending on that number you have received in the input.
Your task is to create a function that visualizes a loading bar depending on that number you have received in the input .
function loadingBar(num) {
  let percentage = num;
  let howManyToReplace = num / 10;
  let percN = '%'.repeat(howManyToReplace);
  let dotN = '.'.repeat(10 - howManyToReplace);
  if (percentage === 100) {
      console.log('100% Complete!');
      console.log(percN);
  } else {
      console.log(`${percentage}% [${percN}${dotN}]`);
      console.log('Still loading...');
  }
}
function loadingBar ( num ) { let percentage = num ; let howManyToReplace = num / 10 ; let percN = '%' . repeat ( howManyToReplace ) ; let dotN = '.' . repeat ( 10 - howManyToReplace ) ; if ( percentage === 100 ) { console . log ( '100% Complete!' ) ; console . log ( percN ) ; } else { console . log ( ` ${ percentage } ${ percN } ${ dotN } ` ) ; console . log ( 'Still loading...' ) ; } }
Your task is to create a function that visualizes a loading bar depending on that number you have received in the input.
Your task is to create a function that visualizes a loading bar depending on that number you have received in the input .