const strings = ['a','b','c','d'];
//push , adding elements to the last of the array
strings.push('e');//O(1)
console.log(strings)
// pop , removing elements from the last of the array
strings.pop();//O(1)
console.log(strings)
// unshift , add an element to the first of the array
strings.unshift('x');//O(n)
console.log(strings)
//splice , adding elements to the mddle of the sarray
strings.splice(2,0,'alien');//O(n)
console.log(strings)