Function checkValidSurahAyah

  • Checks if the given Surah and Ayah (verse) numbers are valid.

    Parameters

    • surah: number

      The Surah (chapter) number to check.

    • ayah: number

      The Ayah (verse) 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 and Ayah numbers are valid, false otherwise.