Awesome. Quick modernisation:
const delay = async ms => new Promise(resolve => setTimeout(resolve, ms))
const loop2 = async () => pricechange_variantid.value
.map(async variant_id => {
await delay(1000)
PriceChange.trigger({
additionalScope: { variant_id }
})
})
loop2()