+ 1
why can i not use filter method on users!
users=docment.querySelectorAll("li"); sourceCode:https://code.sololearn.com/WF0mEvx0Z610/?ref=app
2 ответов
+ 2
🅰🅹 🅐🅝🅐🅝🅣 thanks man,sorry for posting the entire code, i know you had problems with render_lists(filtered_users); function..
+ 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