Hello,
as the title says, i have an array with links ‘/link1’, ‘/link2’ and ‘/link3’ and i want to .push them into array.
I have tried this code:
import wixData from 'wix-data';
var links = [];
wixData.query('database1').find().then((results) => {
results.items.forEach((item) = {
let link = "/" + item.product
links.push(link)
})
})
.catch((error) => {
let errorMsg = error.message;
let code = error.code;
});
At the line 6 (let link = “/”…) i get an error saying that let is a reserved keyword:
Any help is appreciated.
Thanks!