main.js
1
2
3
const colors = ['blue', 'white', 'red'];
console.log(colors[5]);  // => undefined
console.log(colors[-1]); // => undefined
Native Browser JavaScript