How to make pagination with Node, Mongoose, Bootstrap and pass it to html?
Here's the ES6 pseudo-code:
$(".page-link").click(() => { let currentPage = +(location.pathname.replace(/\/page\/(\d+)\b/, "$1")), lastPage = currentPage - 1, nextPage = currentPage + 1, visible = 5, max = 10; // the rest of the code goes here});