The premise of what I'm trying to do is the following:
Let's say we have the following array:
let arr = ["hello", "nice", "stack", "hi", "question", "random"];
What we want to do is reach a point in which we can insert (push) an element into the array (let's say "cat"
as an example) every two existing array elements.
The new array would yield the following:
"hello"
"nice"
"cat" // new element
"stack"
"hi"
"cat" // new element
// so on and so forth...
What's the best way to implement this while reducing runtime?