- sample
Sample from array
- Using Random behind the scenes.
examples/arrays/sample.cr
planets = ["Mercury", "Venus", "Earth", "Mars", "Jupiter"] puts planets puts planets.sample puts planets.sample puts planets.sample puts planets.sample
["Mercury", "Venus", "Earth", "Mars", "Jupiter"] Jupiter Mars Venus Jupiter