Posts by Keit Oliveira • 114 points
3 posts
-
3
votes2
answers50
viewsA: How to sort array based on an object array
An interesting solution would be a kind of numerical ranking. Follow an example const tags = ['new', 'tech']; const boxes = [{ id: 1, name: 'tech ipsum', tags: ['watch', 'tech'], }, { id: 2, name:…
javascriptanswered Keit Oliveira 114 -
0
votes1
answer173
viewsA: useEffect does not recognize new value
You can try to return an object where one of the properties would be the afterAttack and another one with random value as identification that changes with each update of afterAttack. That way, even…
-
6
votes2
answers230
viewsA: What does the / +/g parameter mean in the . split() method?
It is a Regex or Regular Expression. Basically, it is specifying that the string will be split with each found white space. Explaining better The // is the beginning and end of the expression. The…