⊗jsPmBsDR 25 of 504 menu

Division remainder in JavaScript

There is a special operator % that can be used to compute the remainder of dividing one number by another:

alert(10 % 3); // shows 1

If one number is evenly divisible by the second, the remainder will be zero:

alert(10 % 2); // shows 0

Of course, the operator % can be applied not only to numbers, but also to variables:

let a = 10; let b = 3; alert(a % b); // shows 1

Find the remainder after dividing the following variables:

let a = 13; let b = 5;
English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline