text: 'use strict';
  // fix the bugs
  
  console.log('--- loading: repeat string');
  
  function repeatStringHandler() {
    debugger;
    console.log('\n--- action: repeat string ---');
    console.log('range:', typeof range, '\n', range);
    
  
    // read inputs from user
    const stringToRepeat = prompt('enter a string to repeat');
    console.log('stringToRepeat:', typeof stringToRepeat, '\n', stringToRepeat);
    if ( typeof stringToRepeat !== 'string') { throw new TypeError();};
  
    // perform core logic
    let repeatedString = stringToRepeat + ` `;
    for (let i = 1; i < range; i++) {
      repeatedString += stringToRepeat + ` ` ;
    }
    console.log('repeatedString:', typeof repeatedString, '\n', repeatedString);
  
    // alert result for the user
    alert(repeatedString);
  }
  