I do not understand why the wedding method is not working for me I have an array that looks : (It really is big but I did not want to dislodge the page)
I want to say one item in the middle:
var testNavItems = navItems.splice (1, 0, {"content": "new neo "," Icon ":" new app "}); Console.log (testNavItems); OR var testNavItems = navItems.push ({"Content": "new av", "icon": "new app"}); Console.log (testNavItems); I get an empty array, is it possible in JS? .push and .splice no new Do not array them, they modify the original array. Try console.log (navItems);
OR
var testNavItems = navItems.push ({"Content": "new av", "icon": "new app"}); Console.log (testNavItems); I get an empty array, is it possible in JS? .push and .splice no new Do not array them, they modify the original array. Try console.log (navItems);
I get an empty array, is it possible in JS?
.push and .splice no new Do not array them, they modify the original array.
.splice no new Do not array them, they modify the original array.
Try
console.log (navItems);
No comments: Post a Comment
Newer Post Older Post Home Subscribe to: Post Comments (Atom)
No comments:
Post a Comment