Function modulo

  • Returns the remainder of the first number divided by the second (can be in Bangla or English digits).

    Parameters

    • a: string | number

      First number (Bangla or English digits).

    • b: string | number

      Second number (Bangla or English digits).

    • en: boolean = false

      If true, returns the result in English digits. Default is false (returns Bangla digits).

    Returns string

    The remainder of a divided by b.

    modulo("১০", "৩"); // returns "১"
    modulo(10, 3, true); // returns "1"
    modulo("২০", "৭", true); // returns "6"
    modulo("১০০", "৩০"); // returns "১০"

    If the input is invalid or not a number.