From 9ed2f60c9d1dfe5fd5811dd95fe8b4a34a2902b9 Mon Sep 17 00:00:00 2001 From: Henry Hart Alegrado Date: Tue, 18 Jul 2023 04:48:20 +0800 Subject: [PATCH] added spacing and changed the description of splice method --- 05_Day_Arrays/05_day_arrays.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/05_Day_Arrays/05_day_arrays.md b/05_Day_Arrays/05_day_arrays.md index 0dae635..43901ff 100644 --- a/05_Day_Arrays/05_day_arrays.md +++ b/05_Day_Arrays/05_day_arrays.md @@ -424,7 +424,7 @@ console.log(numbers.lastIndexOf(4)) // 3 console.log(numbers.lastIndexOf(6)) // -1 ``` -includes:To check if an item exist in an array. If it exist it returns the true else it returns false. +includes: To check if an item exist in an array. If it exist it returns the true else it returns false. ```js const numbers = [1, 2, 3, 4, 5] @@ -462,7 +462,7 @@ console.log(Array.isArray(number)) // false #### Converting array to string -toString:Converts array to string +toString: Converts array to string ```js const numbers = [1, 2, 3, 4, 5] @@ -504,7 +504,7 @@ console.log(webTechs.join(' # ')) // "HTML # CSS # JavaScript # React # Redux # #### Slice array elements -Slice: To cut out a multiple items in range. It takes two parameters:starting and ending position. It doesn't include the ending position. +Slice: To cut out a multiple items in range. It takes two parameters: starting and ending position. It doesn't include the ending position. ```js const numbers = [1,2,3,4,5] @@ -517,7 +517,7 @@ Slice: To cut out a multiple items in range. It takes two parameters:starting an #### Splice method in array -Splice: It takes three parameters:Starting position, number of times to be removed and number of items to be added. +Splice: It takes three parameters: Starting position, number of elements to remove (optional) and number of elements to add (optional). ```js const numbers = [1, 2, 3, 4, 5]