let reqSection = {}; try { let reqScroll = reqSection.offset().top - 300; } catch { reqScroll = 0; } alert(reqScroll);