I need help accessing the values in my array and assigning them to variables for later use. I have created an array and used the randomGo() function to generate a random number that corresponds to a pair of numbers within the array. My goal is to assign each value to its own variable. For example, if I retrieve the numbers from randomPlaces[0], how do I set var x = 51.528868434293244 and var y = -0.10179429999993772? This is for a project using only Javascript and HTML.
var randomPlaces = [[51.528868434293244, -0.10179429999993772], [40.70590473669712, -73.9780035], [48.85887766623369, 2.3470598999999766], [53.32443937613261, -6.251694999999927], [41.392700620871764, 2.139299250000022], [41.83401317282514, -87.73215545], [-33.79773327558923, 150.92243254999994], [50.05981411178046, 14.465623900000082], [52.50786264022465, 13.426141949999987], [30.02193806214437, -89.8822859]];
var randomLength = randomPlaces.length;
function randomGo(){
var randomValue = randomPlaces[Math.floor(randomPlaces.length * Math.random())];
}