g.js — graphical objects for JavaScript

shuffleshuffle

Randomise the ordering of items in the list.

g.shuffle([1, 2, 3, 4, 5], 48)

Same list with a different seed:

g.shuffle([1, 2, 3, 4, 5], 99)

Parameters

  • l: The list of items.
  • seed: The random variation. Each seed will give a different result.

See Also

  • pick: Take random items from a list.
  • shuffle: Randomly reorganise items in the list.