Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 01f7393

Browse files
committed
Added Javascript file on my repo
1 parent b874013 commit 01f7393

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# Shuffle array using sort method with javascript (step1)
2+
Awesome step to shuffle an Array using the sort method in minutes.
3+
4+
5+
26

‎shuffle.js‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
let a= [1,2,3,4,5,6,7]
2+
let shuffle= alert(a[Math.floor(Math.random()* a.length )]);
3+
const arr=[a.length-1];
4+
for( let a=0; a < 10; a++) {
5+
arr.sort(a[a.length-1]),a[a.length-3];
6+
arr.sort(a[a.length-1]),a[a.length-2];
7+
arr.sort(a[a.length-1]),a[a.length-1];
8+
arr.sort(a[a.length-1]),a[a.length-0];
9+
arr.sort(a[a.length-1]),a[a.length+1];
10+
11+
12+
13+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /