Write Your JavaScript Code Here

// slice():- removes and add element in same method // Array.slice(start,delete,ele1,ele2,...eleN) const arr=["Monday","Tuesday","Thursday","friday",]; // adding the element without remove arr.splice(2,0,"Wednesday"); console.log(arr);

Output: