{"size": 500, "ext": "js", "max_stars_repo_path": "js-advanced/dom-introduction-exercise/05. Table - Search Engine/solution.js", "max_stars_repo_name": "AndriqnAngelov/SoftUni", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js-advanced/dom-introduction-exercise/05. Table - Search Engine/solution.js", "max_issues_repo_name": "AndriqnAngelov/SoftUni", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js-advanced/dom-introduction-exercise/05. Table - Search Engine/solution.js", "max_forks_repo_name": "AndriqnAngelov/SoftUni", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.25, "max_line_length": 74, "alphanum_fraction": 0.652}
function solve() {
  document.querySelector("#searchBtn").addEventListener("click", onClick);

  function onClick() {
    let inputText = document.querySelector("#searchField").value;
    let tableElements = document.querySelectorAll("tbody tr");
    for (let i = 0; i < tableElements.length; i++) {
      if (tableElements[i].textContent.includes(inputText)) {
        tableElements[i].classList.add("select");
      } else {
        tableElements[i].classList.remove("select");
      }
    }
  }
}
