Adapted from a Traversy Media vanilla JavaScript tutorial on YouTube: https://www.youtube.com/watch?v=G1eW3Oi6uoc&list=PLillGF-RfqbbnEGy3ROiLWk7JMCuSyQtX&index=7
https://www.youtube.com/redirect?q=https%3A%2F%2Fgh.neting.cc%2Fdamian-balas%2Ffilterable-list&stzid=UgyKtQatqhi9iSeDh3B4AaABAg&redir_token=9uFnc1S-qa4J08yBjd6yoWJst2d8MTU3MDUyNDcxMUAxNTcwNDM4MzEx&event=comments in line with his advice:
"1. don't use let if you won't change the value of the variable, use const instead. (const foo = document.querySelector('.bar');
2. Don't use for loops, in 99% you can use .forEach()
3. IndexOf is old too, you can use .includes() or the .filter() option"
https://loosenthedark.github.io/traversy-media-filterable-list-js-project