-
Notifications
You must be signed in to change notification settings - Fork 0
Stew.append()
paige edited this page Nov 13, 2023
·
7 revisions
inserts a new entry at a given index
type: Function
arguments:
- index
Number
- key/value
Any
- ?value
Any
list: | pair: |
const { Stew } = require('stews');
let arr = new Stew([ "a", "c" ]);
arr.append(1, "b");
console.log(arr); |
const { Stew } = require('stews');
let obj = new Stew({ key1: "val1", key3: "val3" });
obj.append(1, "key2", "val2");
console.log(obj); |
Stew(3) [ "a", "b", "c" ] |
Stew(3) { key1: "val1", key2: "val2", key3: "val3" } |