Skip to content
Snippets Groups Projects
Commit c7630349 authored by Philip Kaluđerčić's avatar Philip Kaluđerčić :u7121:
Browse files

Update comment in shuf

parent 7b52e818
No related branches found
No related tags found
No related merge requests found
// This horrible file is distributed under the CC0 license. Consult
// ./LICENSE for more details.
// $Id: quiz.js,v 1.2 2024/01/11 16:19:30 oj14ozun Exp oj14ozun $
// $Id: quiz.js,v 1.3 2024/01/12 10:15:28 oj14ozun Exp oj14ozun $
"use strict";
......@@ -27,8 +27,7 @@ var opts = []; // DOM objects of each answer
var progress = JSON.parse(window.localStorage.getItem("progress")) || {};
function shuf(arr) {
// shuffle option-order using Fisher–Yates shuffle
function shuf(arr) { // shuffle arr using Fisher–Yates shuffle
for (let i = 0; i < arr.length - 1; i++) {
const j = Math.floor(Math.random() * arr.length);
const tmp = arr[j];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment