diff --git a/Array/arrayOperations.js b/Array/arrayOperations.js index f0b514e..7c3aea0 100644 --- a/Array/arrayOperations.js +++ b/Array/arrayOperations.js @@ -4,8 +4,8 @@ const strings = ['n', 'u', 'm']; /** * Add element at the End */ -strings.push('a'); -strings.push('n'); +strings.push('d'); +strings.push('e'); /** @@ -14,6 +14,24 @@ strings.push('n'); strings.pop(); +/** + * Add element at the Beginning + */ +strings.unshift('D') +strings.unshift('e') + + +/** + * Remove First element + */ +strings.shift(); + + +/** + * Add element at the Index + */ +strings.splice(4, 0, 'Num',); + console.log(strings); \ No newline at end of file