katosa Posted January 8, 2023 Share Posted January 8, 2023 hello I have a question, How do you insert new value in between specific indexes? like javascript, const fruits = ["Banana", "Orange", "Apple", "Mango"]; fruits.splice(2, 0, "Lemon", "Kiwi"); //Banana,Orange,Lemon,Kiwi,Apple,Mango Quote Link to comment Share on other sites More sharing options...
Sepu Posted January 8, 2023 Share Posted January 8, 2023 Quote s[]@fruits = {"Banana", "Orange", "Apple", "Mango"}; insert(s[]@fruits, 2 , "lemon"); You could use the insert function 1 Quote Link to comment Share on other sites More sharing options...
katosa Posted January 10, 2023 Author Share Posted January 10, 2023 Thank you very much Sepu Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.