Random array without repetition I was answering one challenge here and this task was part of the challenge. I've got a 73 bytes solution in javascript. But I think it is too much for a simple thing.

Challenge

Given as input two integers:


N the length of the expected array
R the interval's range starting in one: 1..R, not 0..R-1


Output in each run of your program/function one different array of length N with values between 1..R in such a way no one value occurs more than once.

You must use R-value in your code.

Restrictions

You can assume: 2 &lt;= N &lt;= R.

I really would like to see a javascript solution shorter than mine 73 bytes.

But of course, it is open to all languages!

If your language can not return an array, you can print all the numbers ;)
Dyalog APL, 1 byte
?

Just a builtin. Try it here.