let items = [1, 2, 3]
items.push(4); // items = [1, 2, 3, 4]
const cars = [];
cars[] = 'Mercedes';
// Add to array
//HTML
//<button onclick="Push()">push</button>
var numbers = [1, 2, 3, 4, 5]
console.log(numbers)
function Push() {
numbers.push('push')
console.log(numbers)
}
// Result
// (5)[1, 2, 3, 4, 5]
// (6)[1, 2, 3, 4, 5, 'push']