Почему-то ошибка:
Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
window.scrollBy(0,1810);
let key;
const fn = () => {
if(key) return;
key = true;
`
key = false;
}
$(window).scroll(function() {
if($(window).scrollTop()+$(window).height()>=$(document).height()) fn()
});