{"size": 427, "ext": "js", "max_stars_repo_path": "string-matching-array/answer.js", "max_stars_repo_name": "redbearin/skill-work", "max_stars_repo_stars_event_min_datetime": "2020-01-15T02:13:13.000Z", "max_stars_repo_stars_event_max_datetime": "2020-01-15T02:13:13.000Z", "max_issues_repo_path": "string-matching-array/answer.js", "max_issues_repo_name": "redbearin/skill-work", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "string-matching-array/answer.js", "max_forks_repo_name": "redbearin/skill-work", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.4666666667, "max_line_length": 60, "alphanum_fraction": 0.6346604215}
function stringMatching(words) {
  const substrings = [];
  for (let index = 0; index < words.length; index++) {
    for (let index1 = 0; index1 < words.length; index1++) {
      if (index === index1) continue;
      const matchIndex = words[index].search(words[index1]);
      if (matchIndex > 0) substrings.push(words[index1]);
    }
  }
  return substrings;
}

const words = ["leetcode","et","code"];

stringMatching(words);