We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a937345 commit 8eff578Copy full SHA for 8eff578
src/leet-code/0020-valid-parentheses/valid-parenth-stack.js
@@ -1,3 +1,4 @@
1
+/** Holds the open-close character relationship between parentheses. */
2
const parens = new Map([
3
['(', ')'],
4
['[', ']'],
@@ -11,10 +12,7 @@ const parens = new Map([
11
12
* @returns {string} Unboxed string.
13
*/
14
const unboxOption = (str) => {
- if (str === undefined) {
15
- throw new Error('string is undefined')
16
- }
17
-
+ if (str === undefined) throw new Error('string is undefined')
18
return str
19
}
20
0 commit comments