How to find an element in JavaScript and move it to the first position.
Surely there are several way to do it, this is just one of them. Let me know if you know a better way to do it πͺπ»
To find an element into an array and move to be the first, you have to:
get the index of the founded item using findIndex()
π The ...
giuliachiola.hashnode.dev3 min read