this seems like very simple maths but somehow, my brain cant think ...
i am trying to implement pagination and will need to calculate the item offset to use in limi
start = (page - 1) * itemsPerPage + 1 end = totalItems if (itemsPerPage < totalItems) { end = itemsPerPage * page if (end > totalItems) { end = totalItems; } } // e.g. "21-30 of 193 items" start + '-' + end + ' of ' + totalItems + ' items'