File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -2440,7 +2440,8 @@ if (a.includes(name = prompt('Enter your name'))) {
24402440
console.log(`hello ${name} , how are you?`); /* works if name specified value is available in array */
24412441
} else console.log(`Welcome.`); // executes when name specified is not in array.
24422442
```
2443-
### fromIndex is optional second parameter
2443+
### fromIndex is an optional second parameter in Array..includes()
2444+
This mentions that the value to be checked using Array..includes() must be after the specified index.
24442445

24452446
```
24462447
var pets = ['cat', 'dog', 'bat'];

0 commit comments

Comments
 (0)