Skip to content

Commit cd448ca

Browse files
committed
docs: add comments of workable code
1 parent b5727b8 commit cd448ca

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

String/CheckPangram.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ const checkPangram = (string) => {
99
throw new TypeError('The given value is not a string')
1010
}
1111

12+
/**
13+
* match all 26 alphabets using regex, with the help of:
14+
* Capturing Group
15+
* Character set
16+
* Negative lookahead
17+
* Dot & star
18+
* Numeric reference
19+
*/
1220
return string.match(/([a-z])(?!.*\1)/gi).length === 26
1321
}
1422

0 commit comments

Comments
 (0)