Задача 08. Array Manipulations от Arrays Advanced Lab, JS Fundamentals
Здравейте. Имам малък проблем със задачата, чието име е в заглавието. Ще бъда благодарен, ако някой успее да ми окаже съдействие.
Код: https://pastebin.com/EbFMJ3cJ
Условие:
Write a function that manipulates an array of numbers.
- Add {number}: add a number to the end of the array
- Remove {number}: remove number from the array
- RemoveAt {index}: removes number at a given index
- Insert {number} {index}: inserts a number at a given index
Note: All the indices will be valid!
Print the final state of the array (separated by single space).
The input comes as array of strings. First element will be a string containing the array to manipulate. Every other command you receive will also be a string.
The output is the manipulated array printed on the console on a single line, separated by space.