Skip to content

Commit e4dc2dc

Browse files
authored
Update task.md
1 parent 78b1918 commit e4dc2dc

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

  • 9-regular-expressions/09-regexp-groups/5-parse-expression

9-regular-expressions/09-regexp-groups/5-parse-expression/task.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Parse an expression
1+
# Разобрать выражение
22

3-
An arithmetical expression consists of 2 numbers and an operator between them, for instance:
3+
Арифметическое выражение включает два числа и оператор между ними. Например:
44

55
- `1 + 2`
66
- `1.2 * 3.4`
77
- `-3 / -6`
88
- `-2 - 2`
99

10-
The operator is one of: `"+"`, `"-"`, `"*"` or `"/"`.
10+
Оператором может быть: `"+"`, `"-"`, `"*"` или `"/"`.
1111

12-
There may be extra spaces at the beginning, at the end or between the parts.
12+
В выражении могут быть пробелы вначале, конце или между частями выражения.
1313

14-
Create a function `parse(expr)` that takes an expression and returns an array of 3 items:
14+
Создайте функцию `parse(expr)`, которая принимает выражение и возвращает массив из трех элементов:
1515

16-
1. The first number.
17-
2. The operator.
18-
3. The second number.
16+
1. Первое число.
17+
2. Оператор.
18+
3. Второе число.
1919

20-
For example:
20+
Например:
2121

2222
```js
2323
let [a, op, b] = parse("1.2 * 3.4");

0 commit comments

Comments
 (0)