Let's consider an array:
array1 = [1, 2, 3, 4, 5, ........, 50]
If we want to create a new array by randomly selecting elements from array1 with a specific length constraint, for example 5 numbers, the result could be:
var arrayLength = 5
randomizedArray = [6, 20, 45, 2, 13]
Is it possible to achieve this using Math.random?