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

212
Views
How to use multiple methods in JavaScript at the same time

I have an input where you can search for a specific course by its name, for this I use filtering, and also the includes() method, my problem is that I need to apply three methods at the same time, the first method is toLowerCase(), the second is toUpperCase() and the last method is trim()

GetMyCourses() {
  return this.courses.filter(value => {
    return value.title.toLowerCase().includes(this.result);
  });
},

If you leave the toLowerCase method, then it does not give capital names when searching, and vice versa, in addition, if you remove these two methods, then when searching you will need to accurately search for the word

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Convert this.result to lower case as well.

GetMyCourses() {
  let result = this.result.toLowerCase()
  return this.courses.filter(value => {
    return value.title.toLowerCase().includes(result);
  });
},
over 4 years ago · Santiago Trujillo Report
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!