It's weird, but I can't seem to find an easy solution.
Note . I'm using immutability so I absolutely don't want to modify the original array (don't suggest using push
)
[].concat(["x","y"],"z")
→ How to get [["x","y"],"z"]
instead ["x","y","z"]
?
source
to share