+ 1

why can i not use filter method on users!

users=docment.querySelectorAll("li"); sourceCode:https://code.sololearn.com/WF0mEvx0Z610/?ref=app

24th Jun 2021, 8:32 AM
🤖Web Gig🤖
🤖Web Gig🤖 - avatar
2 Respuestas
+ 2
🅰🅹 🅐🅝🅐🅝🅣 thanks man,sorry for posting the entire code, i know you had problems with render_lists(filtered_users); function..
24th Jun 2021, 9:22 AM
🤖Web Gig🤖
🤖Web Gig🤖 - avatar
+ 1
🤖Web Gig🤖 document.querySelectorAll("li") returns NodeList which is not a genuine array and filter function exist in array so convert document.querySelectorAll("li") to an array then store in users like this: let users=Array.from(document.querySelectorAll("li")); https://code.sololearn.com/Wuhfctiy9q7g/?ref=app
24th Jun 2021, 8:48 AM
A͢J
A͢J - avatar