Animals in splice

Report a typo

We have an array:

const myArray = ['dog', 'cat', 'elephant', 'tiger', 'pigeon'];

Write an expression in which you use the splice() method to replace the string 'tiger' with the strings 'lion' and 'pig' (write the expression without spaces).

Enter a short text
___

Create a free account to access the full topic