1

can anyone help to define the error in this code:

     function logMatches() {
          var matches = ['Paulson', 'Sarah', 'Jad', 'Joanna'];
          for (var i=0; i<matches.length; i++) {
            setTimeout(function() {
              console.log(matches[i]);
        
            }, 1000);
          }
    }
Ali
  • 11
  • 2

0 Answers0