-
Notifications
You must be signed in to change notification settings - Fork 0
Stew.get()
paige edited this page Nov 13, 2023
·
8 revisions
gets an entry by index or key
type: Function
alt names:
- at()
list: | pair: |
const { Stew } = require('stews');
let arr = new Stew([ "val1", "val2" ]);
console.log(arr.get("val1"));
console.log(arr.get(0)); |
const { Stew } = require('stews');
let obj = new Stew({ key1: "val1" });
console.log(obj.get("key1"));
console.log(obj.get(0)); |
"val1" // get by key
"val1" // get by index |
"val1" // get by key
"val1" // get by index |