Home > Software design >  Javascript Check if one decimal number is a multiple of another decimal number
Javascript Check if one decimal number is a multiple of another decimal number

Time:04-14

Hello I am trying to build a function in javascript to check if a decimal number is multiple of another decimal number:

var num1 = 0.0002;
var num2 = 0.0001;

var remainder = (num1 % num2);
console.log(remainder);

if (remainder === 0) {
  console.log('           
  • Related