function find_smallest_change(num1, num2) {
  // When both numbers are int the smallest change will be 1
  if (Number.isInteger(num1) && Number.isInteger(num2)) {
    return 1;
  }
  // Find the maximum number of digits if exist
  max_decimal_place = Math.max(num1.countDecimals(), num2.countDecimals());
  // When one number is int and another is float, the smallest change is 1
  if (max_decimal_place == 0) {
    return 1;
  }

  // When at least one of the numbers is valid float, find the smallest change and return
  var change = '1';
  for (var i = 0; i < max_decimal_place - 1; i++) {
    change = '0' + change;
  }

  return parseFloat('0.' + change);
}
// Find the smallest change of last digit of num1/num2

Find the smallest change of last digit of num1/num2
Find the smallest change of last digit of num1 / num2
function find_smallest_change(num1, num2) {
  if (Number.isInteger(num1) && Number.isInteger(num2)) {
    return 1;
  }
  max_decimal_place = Math.max(num1.countDecimals(), num2.countDecimals());
  if (max_decimal_place == 0) {
    return 1;
  }
  var change = '1';
  for (var i = 0; i < max_decimal_place - 1; i++) {
    change = '0' + change;
  }
  return parseFloat('0.' + change);
}
function find_smallest_change ( num1 , num2 ) { if ( Number . isInteger ( num1 ) && Number . isInteger ( num2 ) ) { return 1 ; } max_decimal_place = Math . max ( num1 . countDecimals ( ) , num2 . countDecimals ( ) ) ; if ( max_decimal_place == 0 ) { return 1 ; } var change = '1' ; for ( var i = 0 ; i < max_decimal_place - 1 ; i ++ ) { change = '0' + change ; } return parseFloat ( '0.' + change ) ; }
Find the smallest change of last digit of num1/num2
Find the smallest change of last digit of num1 / num2
// When both numbers are int the smallest change will be 1
 // Find the maximum number of digits if exist
 // When one number is int and another is float, the smallest change is 1
 // When at least one of the numbers is valid float, find the smallest change and return
