Function checkValidSurah

  • Checks if the given Surah (chapter) number is valid.

    Parameters

    • surah: number

      The Surah (chapter) number to check.

    • checkOnly: boolean = false

      If true, the function will only check the validity and not throw an error.

    Returns boolean

    True if the Surah number is valid, false otherwise.