As I understand it,you need to make a function that will iterate over array or can be done another way?
What hour fighting over this garbage,nothing comes out
Only now I have the function pulls a random element and they are repeated - nikita.Stracke commented on June 10th 19 at 14:47
there are options
1. pre-shuffle the list.
2. to check, did not come across this item before, and pull the other. (but it will be very inefficient on large lists, which come to an end)
3. to remove the element, who pulled the arr.splice(n, 1)
PS: the Code image is very bad form. Especially when it is a link, not img. - Austen.Thompson53 commented on June 10th 19 at 14:50
Code I didn't send the picture,code fidle,a picture of a small piece of the task - nikita.Stracke commented on June 10th 19 at 14:53
Francesca answered on June 10th 19 at 14:46
Solution
Here is sort of create 8 objects with different avatars like in the job click
z.s. you have a test task for knowledge of OOP, read about it
screenshot.su/show.php?img=e3577dce9057719336d0a5b...
Only now I have the function pulls a random element and they are repeated - nikita.Stracke commented on June 10th 19 at 14:47
1. pre-shuffle the list.
2. to check, did not come across this item before, and pull the other. (but it will be very inefficient on large lists, which come to an end)
3. to remove the element, who pulled the arr.splice(n, 1)
PS: the Code image is very bad form. Especially when it is a link, not img. - Austen.Thompson53 commented on June 10th 19 at 14:50