Skip to content

Stew.get()

paige edited this page Nov 14, 2023 · 8 revisions

gets an entry by index or key
type: Function

alt names:

  • at()

arguments:

  • entry Any:
    index or key to get

list: pair:
const { Stew } = require('stews');


let arr = new Stew([ "val1", "val2" ]);


console.log(arr.get("val1"));
console.log(arr.get(0));


// these work the same
arr["val1"];
arr[0];
const { Stew } = require('stews');


let obj = new Stew({ key1: "val1" });


console.log(obj.get("key1"));
console.log(obj.get(0));


// these work the same
obj["key1"];
obj[0];
"val1" // get by key
"val1" // get by index
"val1" // get by key
"val1" // get by index


Stews Docs 🍲

🛈 Stew 🛈 Soup
🛈 Noodle 🛈 random

Clone this wiki locally