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
some, but here you certainly don't need it. It's like the answer says.filter(value => new RegExp(search, "i").test(value.title)),searchbeing something you made safe or built from some logic playcode.io/823069