What will be the output of the following code?
const array = [1, 2, 3]; console.log(array[5]);
An error will occur because the index is out of range.
undefined
null