demo array methods

Arrays used:

fruits = []

numbers = []

log each fruit in fruits array:

filter all fruits that start with p:

map creates new array where elements are fruit name✼:

reduce numbers array to its sum:

the index of kiwi in fruit array is:

does mango includes in fruits array?

sort numbers in descending:

join numbers by ✼:

push 100 at the end:

Removes the last element from numbers:

shift first element of fruits array to new fruits array

here unshift '100' at the start of numbers, returns the new length of numbers.

reverse numbers array