Turn an integer n into a list containing it n times Given an integer n as input, return a list containing n, repeated n times. For example, the program would take 5 and turn it into [5,5,5,5,5]. The elements need to be integers, not strings. No built-in functions that accomplish the task are allowed.

This is code-golf, so standard rules apply.
Jelly, 1 byte

x


Try it online!

Note that this is not the “repeat n n times” built-in — its function is more general than that. For example 4,5,6x1,2,3 equals [4, 5, 5, 6, 6, 6]. Given only one argument, Jelly just happens to use it as both the left and right argument for the supplied link, but this functionality is not inherent to x.

If this doesn’t count, there are various fun 2-byte alternatives:

x` ṁ` Ra Rị R» a€ oR oḶ oṬ oẊ Ḷị Ḷ» Ṭị Ṭ» Ẋị Ẋ» ị€ ṛ€ ȧ€ »€


etc.