From f318661ce093b922cadd225e4ea5439abeeec63b Mon Sep 17 00:00:00 2001 From: Patrick Njuguna Date: Mon, 6 Jan 2020 07:54:13 +0300 Subject: [PATCH] slice array elements example fix --- 05_Day/05_day_arrays.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/05_Day/05_day_arrays.md b/05_Day/05_day_arrays.md index 57065a7f..7b753623 100644 --- a/05_Day/05_day_arrays.md +++ b/05_Day/05_day_arrays.md @@ -490,8 +490,8 @@ Slice: To cut out a multiple items in range. It takes two parameters:starting an ```js const numbers = [1,2,3,4,5] - console.log(numbers.slice() // -> it copies all item - console.log(numbers.slice(0) // -> it copies all item + console.log(numbers.slice()) // -> it copies all item + console.log(numbers.slice(0)) // -> it copies all item console.log(numbers.slice(0, numbers.length)) // it copies all item console.log(numbers.slice(1,4)) // -> [2,3,4] // it doesn't include the ending position ```