diff --git a/1-js/06-advanced-functions/01-recursion/article.md b/1-js/06-advanced-functions/01-recursion/article.md
index 1dedd2286d..466ce26bd9 100644
--- a/1-js/06-advanced-functions/01-recursion/article.md
+++ b/1-js/06-advanced-functions/01-recursion/article.md
@@ -31,7 +31,7 @@ There are two ways to implement it.
let result = 1;
// multiply result by x n times in the loop
- for(let i = 0; i < n; i++) {
+ for (let i = 0; i < n; i++) {
result *= x;
}
@@ -67,8 +67,8 @@ pow(x, n) =
else = x * pow(x, n - 1)
```
-1. If `n==1`, then everything is trivial. It is called *the base* of recursion, because it immediately produces the obvious result: `pow(x, 1)` equals `x`.
-2. Otherwise, we can represent `pow(x, n)` as `x * pow(x, n-1)`. In maths, one would write xn = x * xn-1. This is called *a recursive step*: we transform the task into a simpler action (multiplication by `x`) and a simpler call of the same task (`pow` with lower `n`). Next steps simplify it further and further untill `n` reaches `1`.
+1. If `n == 1`, then everything is trivial. It is called *the base* of recursion, because it immediately produces the obvious result: `pow(x, 1)` equals `x`.
+2. Otherwise, we can represent `pow(x, n)` as `x * pow(x, n - 1)`. In maths, one would write xn = x * xn-1. This is called *a recursive step*: we transform the task into a simpler action (multiplication by `x`) and a simpler call of the same task (`pow` with lower `n`). Next steps simplify it further and further until `n` reaches `1`.
We can also say that `pow` *recursively calls itself* till `n == 1`.
@@ -91,7 +91,7 @@ Here we can rewrite the same using the ternary `?` operator instead of `if` to m
```js run
function pow(x, n) {
- return (n == 1) ? x : (x * pow(x, n-1));
+ return (n == 1) ? x : (x * pow(x, n - 1));
}
```
````
@@ -134,7 +134,7 @@ We can sketch it as:
-That's when the function starts to execute. The condition `n == 1` is falsy, so the flow continues into the second branch of `if`:
+That's when the function starts to execute. The condition `n == 1` is false, so the flow continues into the second branch of `if`:
```js run
function pow(x, n) {
@@ -160,7 +160,7 @@ The variables are same, but the line changes, so the context is now:
-To calculate `x*pow(x, n-1)`, we need to make a subcall of `pow` with new arguments `pow(2, 2)`.
+To calculate `x * pow(x, n - 1)`, we need to make a subcall of `pow` with new arguments `pow(2, 2)`.
### pow(2, 2)
@@ -230,7 +230,7 @@ function pow(x, n) {
There are no more nested calls, so the function finishes, returning `2`.
-As the function finishes, its execution context is not needed any more, so it's removed from the memory. The previous one is restored off the top of the stack:
+As the function finishes, its execution context is not needed anymore, so it's removed from the memory. The previous one is restored off the top of the stack: