Function sqrt

  • Returns the square root of a number (can be in Bangla or English digits).

    Parameters

    • a: string | number

      Number (Bangla or English digits).

    • en: boolean = false

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

    • decimalPlaces: number = 12

      Number of decimal places to round the result. Default is 12.

    Returns string

    The square root of a.

    sqrt("২৫"); // returns "৫"
    sqrt(25, true); // returns "5"
    sqrt("১০০", true); // returns "10"
    sqrt("১৬"); // returns "৪"

    If the input is invalid or not a number.