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
Like strings, JavaScript also contains a function concat()
to combine multiple arrays. Follow the example below:
let fruits1 = ['Apple', 'Mango']; let fruits2 = ['Orange', 'Grapes']; console.log(fruits1.concat(fruits2));
In the above example, we combined the arrays fruits1
and fruits2
. The output will contain all the elements of the arrays fruits1
and fruits2
.