What technique should I use to randomly extract one element of an array and not sequentially extract the same element?
The parts that are taken out at random are made.
I'm sorry it's rough
Please let me know
1) Remove selected elements using splice
.
2) Replace the selected element with the last element to reduce the selection range by one without pop
or pop
© 2024 OneMinuteCode. All rights reserved.