Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
how to search an array for a substring

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!