)
}
}
)
(
}
{
)
)
(
)
(
(
{
}
)
(
)
}
)
)
{
(
(
)
)
}
)
(
}

Shuffle an Array

  1. const nums = [1, 10, 20, 30, 50, 88];
  2. nums.sort(() => Math.random() - 0.5);
  3. console.log(nums);

Common way to shuffle the values in an array.

snippet.zone ~ 2021-22 /// {s/z}