What value is printed when executing the following code?
let min = Infinity;
const numbers = [3, 1, 4, 1, 5];
numbers.forEach(num => {
if (num < min) min = num;
});
console.log(min);
What value is printed when executing the following code?
let min = Infinity;
const numbers = [3, 1, 4, 1, 5];
numbers.forEach(num => {
if (num < min) min = num;
});
console.log(min);