JavaScript Arrays’ Methods
Array push() The push() method adds a new element to the end of the array. const vehicles = [“Car”, “Bus”, “Van”, “Lorry”, “Bike”]; vehicles.push(“Plane”); //Output -> [“Car”, “Bus”, “Van”, “Lorry”, “Bike”, “Plane”] and also you can get new array length by implementing like this, const vehicles = [“Car”, “Bus”, “Van”, “Lorry”, “Bike”]; let length = […]