A JavaScript search box implementation for real-time search. To ensure smooth searching, the users input is debounced such that the search is only performed when they have completed a search term, unfocused the search box, or not typed anything for half a second.
<input type="search" placeholder="Enter some text" name="name" />
<p id="values"></p>
<script>
const input = document.querySelector("input");