const random = _ => _ => Math.trunc(Math.random()*100);
const getRand = random();
const bookmarks = dom.createMultipleElements(
`a${getRand()}`,
bookmarkList.map(x => x.name),
bookmarkList.filter(obj => Object.keys(obj) !== "name")
);
expected output : [a42, a65, a4, a75, a65, a31, a43]
current output : [a42, a42, a42, a42, a42, a42, a42]
17 June 2023
Darshanconst random = _ => _ => Math.trunc(Math.random()*100);
const getRand = random();
const bookmarks = dom.createMultipleElements(
`a${getRand()}`,
bookmarkList.map(x => x.name),
bookmarkList.filter(obj => Object.keys(obj) !== "name")
);
expected output : [a42, a65, a4, a75, a65, a31, a43]
cur
const random = () => Math.trunc(Math.random() * 100);
const getRand = random();
const bookmarks = dom.createMultipleElements(
a${getRand},
bookmarkList.map(x => x.name),
bookmarkList.filter(obj => Object.keys(obj) !== "name")
);