Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
window.orientation = true
const err1 = []
const err2 = []
arr2.forEach(item => {
const isElemenInArr1 = arr1.some(el => el.id === item.id)
if (!isElemenInArr1) {
err1.push(item.id)
} else {
const element = arr1.find(el => el.id === item.id)
if (element.count < item.min_ostatok) err2.push(item.id)
}
})