How to get whole number when dividing 2 numbers in JavaScript

javascript, jquery

Solution

Try:

var Totalpages = Math.ceil(Total Records/ Records per Page);

Here:

var Totalpages = Math.ceil(69/10);   // gives 7

Problem

I am implementing paging in JavaScript, Now if I have `total_item_count = 69` and I want 10 records per page then it should show 7 pages but it is showing 6 pages. What I am doing: ``` var totalpages = 69/10 ; // it should give 7 but its giving 6 ``` Thanks in advance.

Original source