If you just want to remove the duplicates, then Set will be the easier solution to this
[...new Set(str.split(' '))] //str is the string holding all the hash tags entered
this is just the snippet and not the complete implementation
The duplicates needs to be removed one by one not at once.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you just want to remove the duplicates, then Set will be the easier solution to this
this is just the snippet and not the complete implementation
The duplicates needs to be removed one by one not at once.