I am fetching data from an api.Trying to make quiz application from the data of an API.I have selected random countries and their respective capitals and map them to my quiz application.I have achieved this already.Now i am trying to shuffle my answer options but not able to do that.anybody can please help? Here is my code I have applied
Tag: shuffle
Is it correct to use JavaScript Array.sort() method for shuffling?
I was helping somebody out with his JavaScript code and my eyes were caught by a section that looked like that: My first though was: hey, this can’t possibly work! But then I did some experimenting and found that it indeed at least seems to provide nicely randomized results. Then I did some web search and almost at the top