Please consider the following code. This code works as expected.
function paging(totalItems, currentPage, itemsPerPage) { this.totalItems = (typeof totalIte