I have been working on a simple react project wherein I found this snippet
let hand1 =[]
let hand2 =[ ...this.props.pokemon];
while(hand1.length < hand2.length){
let randIdx = Math.floor(Math.random()*hand2.length);
let randPokemon = hand2.splice(randIdx,1)[0];
hand1.push(randPokemon)
}
What is the use of ..this.props.pokemon here?