Debouncing is a strategy used to ensure that a function is only executed after a certain period of time has passed since it was last called.
You need to optimize the search function below so that it is called only after the user stops typing as shown in the GIF below.