Answer the question
In order to leave comments, you need to log in
How to reproduce inserting an element in the middle of an array without losing elements?
How is it possible to reproduce this action? If I understand correctly, then it is necessary to "remember" the element that will be lost and somehow "glue" them together. Thanks in advance for your reply.
Sample additional element:
9
Sample array:
[ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ]
Desired output:
[ 1 , 2 , 3 , 4 , 9 , 5 , 6 , 7 , 8 ]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question