I want to create an array of size 100 so that the values are displayed in the X number of occurrences defined in another array.
So, the following arrays:
arr1 = ['text1', 'text2', 'text3', 'text4', 'text5', 'text6']
arr2 = [5, 5, 10, 10, 20, 50]
Creates a new array containing 5 times the value 'text1', 50 times the value 'text6', etc.
source
share