Mark As Completed Discussion

Are you sure you're getting this? Click the correct answer from the options.

From the JavaScript below, what will the console output be?

JAVASCRIPT
1const numbers = [6, 20, 63, 2, 24]
2
3let minimum = Infinity
4let maximum = -Infinity
5
6for(let number of numbers){
7    if(number < minimum)
8        minimum = number
9        
10    if(number > maximum)
11        maximum = number
12 }
13 
14 console.log(`Minimum Value: ${getMinOfArray(numbers)}` + `\nMaximum Value: ${getMaxOfArray(numbers)}`);

Click the option that best answers the question.

  • Maximum Value: 63, Minimum Value: 2
  • Maximum Value: 24, Minimum Value: 20
  • Maximum Value: 2, Minimum Value: -∞
  • Maximum Value: 2, Minimum Value: 63