result == 1) {
console.log('ok')
}
if (result == 2) {
console.log('no')
}
const trigger = document.querySelectorAll(triggerSelector)
$result = CIBlockElement::GetList(array('ID' => 'DESC'), array(), false, array('nTopCount' => 10), array('ID'));
while($item = $result->fetch()){
$items[] = $item['ID'];
}
echo '<pre>' . print_r($items, true) . '</pre>';