Meal maker solution - why doesnt getRandomDishfromCourse select dishPrice?

In the meal maker solution we are implementing an ‘addDishtoCourse’ function that pushes a dishName and dishPrice to the 3 courses.

While in testing I see that the solution works, as the code is written I am expecting the ‘getRandomDishfromCourse’ to occasionally randomly select the dishPrice from this array as we just added this in to each course with ‘addDishtoCourse’. How does the getRandomDishfromCourse function only select from the dishNames (as we desire)?