i have a text input on my page. with onkeyup i want to get a filtered output of an array. so there is an array that contains all elements, consisting exclusively of strings and an array with the filtered elements. however, not the first result, but directly all hits are to be output.
as an example:
let array = ["c", "c++", "js", "java", "python"]
let to_search = "c"
==> let output = ["c", "c++"]
of course, new characters are constantly entered at onkeyup and all matching hits should always be displayed. How do I set this