Consider the following array:
var arr = ['a','b','c','d'];
Your task is to prompt the user to input a number, for instance: 6, 7, 10, or any other number.
Let's assume that the user enters: 10
The desired output would be: a b c d a b c d a b
A total of 10 values should be printed using the array values in order.
The challenge here is to achieve this without utilizing any if conditions.