LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   math division in javascript (https://www.linuxquestions.org/questions/programming-9/math-division-in-javascript-360913/)

rblampain 09-06-2005 10:17 PM

math division in javascript
 
Is there a way to divide a number and find if there is a remainder in Javascript?
User enters a year that's divided by 4 to find if year is bissextile (leap-year).
Or is there another way?

Thank you for your help.

pnellesen 09-06-2005 10:27 PM

try the following

var rmndr = a%b

rblampain 09-07-2005 04:07 AM

That did the job. Thank you.


All times are GMT -5. The time now is 04:55 PM.