code: function filterFiles(files, validExtensions) {
      const accepted = [];
  
      for (const fileName of files) {
          if (accepted.indexOf(fileName) === -1 && fileMatchesExtension(fileName, validExtensions)) {
              accepted.push(fileName);
          }
      }
  
      return accepted;
  }
docs: Make sure we only use valid extensions, and each fileName appears only once