FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeMaster-learn_cosing_with_ease/script.js at main · syntax-error002/codeMaster-learn_cosing_with_ease · GitHub
syntax-error002
/
codeMaster-learn_cosing_with_ease
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeMaster-learn_cosing_with_ease
/
script.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (15 loc) · 517 Bytes
Breadcrumbs
codeMaster-learn_cosing_with_ease
/
script.js
Copy path
File metadata and controls
18 lines (15 loc) · 517 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Add this shuffle function
function
shuffleArray
(
array
)
{
for
(
let
i
=
array
.
length
-
1
;
i
>
0
;
i
--
)
{
const
j
=
Math
.
floor
(
Math
.
random
(
)
*
(
i
+
1
)
)
;
[
array
[
i
]
,
array
[
j
]
]
=
[
array
[
j
]
,
array
[
i
]
]
;
}
return
array
;
}
// Modify your existing code where questions are loaded/initialized
function
initQuiz
(
)
{
// ... existing code ...
// Shuffle the questions array
questions
=
shuffleArray
(
[
...
questions
]
)
;
// ... rest of initialization code ...
}
Back
|
FazBrowse Home
|
New Git URL