Monday, June 11, 2018

JavaScript - Modulus - Finding Remainder

Below code demonstrates usage of modulus operator - % 

var a = 15;
var b = 7;

a %=b;

console.log(a);

Try it out at: http://jsbin.com

No comments:

Post a Comment