In what scenario are programs like this useful? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

In what scenario are programs like this useful?

let newArr = ['Three', 'Four']; let arr = ['One', 'Two', ...newArr, 'Five']; console.log(arr);

8th Jul 2019, 11:56 AM
eMBee
eMBee - avatar
2 Answers
+ 2
Infinite situations, like you made a list of usernames but you want someusers shown not at the last but between of other array values.
8th Jul 2019, 12:03 PM
Aykut Saraç
Aykut Saraç - avatar
+ 2
Also useful for asking questions in Q&A.
8th Jul 2019, 12:09 PM
Sonic
Sonic - avatar