1. join()

Explanation: The join() method combines all array elements into a single string. You can specify a separator.

Example 1:

let fruits = ["apple", "banana", "cherry"];
console.log(fruits.join(", ")); // "apple, banana, cherry"

Example 2:

let numbers = [1, 2, 3];
console.log(numbers.join("-")); // "1-2-3"

Example 3:

let letters = ["a", "b", "c"];
console.log(letters.join("")); // "abc"

2. splice()

Explanation: The splice() method changes the contents of an array by removing, replacing, or adding elements at a specific index.

Example 1 (Remove elements):

let numbers = [1, 2, 3, 4, 5];
numbers.splice(2, 2);
console.log(numbers); // [1, 2, 5]

Example 2 (Replace elements):

let fruits = ["apple", "banana", "cherry"];
fruits.splice(1, 1, "kiwi");
console.log(fruits); // ["apple", "kiwi", "cherry"]

Example 3 (Add elements):

let animals = ["dog", "cat"];
animals.splice(1, 0, "rabbit");
console.log(animals); // ["dog", "rabbit", "cat"]

3. flat()

Explanation: The flat() method flattens a nested array into a single array.