Learn JavaScript
Lesson 1 - Introduction To JavaScript
Lesson 2 - Basic JavaScript Syntax
Lesson 3 - Control Flow
Lesson 4 - Functions
Lesson 5 - Basic Data Structures
Lesson 6 - Basic String Operations
Lesson 8 - Exception Handling
Lesson 9 - Packages
Lesson 10 - User Input
JavaScript's push()
function adds a new element at the end of the array.
let fruits = ['Apple', 'Banana']; fruits.push('Mango'); console.log(fruits);
Here, we included a new element Mango
at the end of the array fruits
. Now, include a new element Orange
in the array fruits
: