|
1 | 1 | # Shuffle array using sort method with javascript (step1)
|
| 2 | + |
2 | 3 | Awesome step to shuffle an Array using the sort method in minutes.
|
3 | 4 |
|
4 | 5 | IMPORTANT POINTS TO NOTE ABOUT THIS PROJECT:
|
5 | 6 |
|
6 | 7 | 1:To begin with, this repo might seems simple but it's very essential when developing real world object. for instance, when developing a bookshop website for a client or yourself. however, making use of sort method to shuffle the books or pictures on the website.
|
| 8 | + |
7 | 9 | 2: you can achieve step by creating a function that will shuffle the books and itrate through the array that contain the books with "for loop" (books.length).
|
| 10 | + |
8 | 11 | 3:then make use of the sort array method to shuffle the books to be able to display randomly whenever you refresh your web browser.
|
| 12 | + |
9 | 13 | 4:lastly, you can shuffle an array using different methods. but i got only two ways to do that. which i'd be showing y'all the second step you can use to shuffle an array on my next repo.
|
10 | 14 |
|
11 | 15 |
|
12 | 16 |
|
| 17 | + |
13 | 18 |
|
0 commit comments