add items to arraty code example
Example 1: js add item to array
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.push("Kiwi");
Example 2: javascript add element to array
const langages = ['Javascript', 'Ruby', 'Python'];
langages.push('Go'); // => ['Javascript', 'Ruby', 'Python', 'Go']
const dart = 'Dart';
langages = [...langages, dart]; // => ['Javascript', 'Ruby', 'Python', 'Go', 'Dart']