You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/646d404259f512c1a9e86ac1.md
+15-25Lines changed: 15 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,53 +6,43 @@ dashedName: step-74
6
6
---
7
7
8
8
# --description--
9
+
In your `highPrecedence` function, declare a variable using `const` and assign it a regex that checks if the string passed to the `str` parameter matches the pattern of a number followed by a `*` or `/` operator followed by another number.
9
10
10
-
In your `highPrecedence` function, declare a `regex` variable. Assign it a regular expression that matches a number (including decimal numbers) followed by a `*` or `/` operator followed by another number.
11
-
12
-
Each number, and the operator, should be in separate capture groups.
13
-
14
-
Incorporate the regular expression you've defined into your `highPrecedence` function to test if the provided string `str` matches the pattern. Use the `test()` method on your `regex` variable and return the result.
11
+
Your function should return a boolean value. Remember that you can use the `test()` method for this.
15
12
16
13
# --hints--
17
14
18
-
19
-
You should declare a `regex` variable in your `highPrecedence` function.
15
+
You should declare a variable in your `highPrecedence` function for your regex.
Your `highPrecedence` function should correctly check if the string matches the pattern of a number followed by a `*` or `/` operator followed by another number.
0 commit comments