How do I create an array with random unique numbers in a specific range?

If it matters, it might be more efficient to do:

using StatsBase
sample(1:40, 30; replace=false)
9 Likes