Skip to content

Commit e201c1d

Browse files
committed
fix syntax for continue, split and recursive-functions content
1 parent be68324 commit e201c1d

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

en/functions/recursive-functions.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ function recursiveFunction(params) {
2525
Common Use Cases
2626
Recursive functions are often used to solve problems that can be divided into smaller, similar subproblems. Here are some common use cases:
2727

28-
1. Calculating Factorials
28+
1. Calculating Factorials:
29+
2930
A recursive function can be used to calculate the factorial of a number.
31+
3032
```javascript
3133
function factorial(n) {
3234
if (n === 0) {
@@ -38,8 +40,9 @@ function factorial(n) {
3840

3941
factorial(5); // Returns 120
4042
```
41-
2. Fibonacci Sequence
43+
2. Fibonacci Sequence:
4244
The Fibonacci sequence can be calculated using recursion.
45+
4346
```javascript
4447
function fibonacci(n) {
4548
if (n <= 1) {

en/loops/continue.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ for (let i = 1; i <= 5; i++) {
1919
}
2020
console.log(`Current value of i: ${i}`);
2121
}
22+
```
2223

en/strings/split.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pageNumber: 36
44
---
55
# Split
66

7-
The split() method divides a string into a list of substrings and returns them as an array.
7+
The `split()` method divides a string into a list of substrings and returns them as an array.
88
* using the `split()` method
99
* using the template literal (introduced in ES6)
1010

en/strings/substring.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,18 @@ The `string.substring()` is an inbuilt function in JavaScript that is used to re
88

99
Syntax:
1010

11-
string.substring(Startindex, Endindex)
11+
`string.substring(StartIndex, EndIndex)`
1212

1313
# Syntax:
1414

15-
*str.substr(start , length)
16-
15+
* using `str.substr(start , length)`
1716
* using the `substr()` method
1817
* using the template literal (introduced in ES6)
1918

20-
The substr() method takes in:
19+
The `substr()` method takes in:
2120

22-
Parameters: Here the Startindex and Endindex describe the part of the string to be taken as a substring. Here the Endindex is optional.
23-
Return value: It returns a new string that is part of the given string. JavaScript code to show the working of string.substring() function:
21+
Parameters: Here the StartIndex and EndIndex describe the part of the string to be taken as a substring. Here, the EndIndex is optional.
22+
Return value: It returns a new string that is part of the given string. JavaScript code to show the working of `string.substring()` function:
2423

2524
```javascript
2625
//Example 1:

0 commit comments

Comments
 (0)