Skip to content Skip to sidebar Skip to footer

Javascript: Sort Array Of Twitter Usernames To Console

Ref. Based on this question I want to further sort the result, not all the usernames starts with an @, I have tried this: var users = [...document.querySelectorAll('.userRowTableI

Solution 1:

users is an array. Try Array.filter

var matches = users.filter(v => v.match(/@\w+/g)) 

Post a Comment for "Javascript: Sort Array Of Twitter Usernames To Console"