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