Skip to navigation
JavaScript function to randomly return an array object from an array
28.04.23
```console async function random_filler(styles) { let rows = [] for(let x=0;x<=10;x++) { let rkey = Math.floor(Math.random() * styles.length); let key = styles[rkey]; let rvalue = Math.floor(Math.random() * 1000); let r = {style:key, qty:rvalue}; rows.push(r); } await set_to_input(rows); } ```
Reply
Anonymous
Information Epoch 1732434673
Store numerical data in flat files.
Home
Notebook
Contact us