var numbers = [1, 2, 3, 4, 5]; var result = numbers.slice(2, -2); console.log(result); sir ekhane tw kopoi pore nai..... output keno [3] dekhche??? output na [ ] asar kotha??
(2, -2) 2 means [1,2] kata. -2 means [5,4] kata back theke. majhe [3] thake. so ans: [3] from the example at 2:35 (-1, 3) -1 means [5] kata back theke. 3 means [1,2,3,4] kata. majhe thake []. so ans:[] note: slice(first, second) first=>included the last index. if first =-1, so 5 is included second=>excluded the last index. if second = 3, so 4 is excluded
tnx vaiya.
Thanks
Awesome
nice video bhaiya
❤❤❤❤
Thank You Vayia. Its Helpful.
Thanks for the detailed video Dada. Very informative Watch Date: 11-05-2024
Onek valo laglo . Thanks😍
09 Sep, 22
Awesome.............
👍👍
Thanks for this awesome video.
Clean teaching style
আমি একটু কোপ মারতে চাই। হাহাহাহা ভাল্লাগছে কথাটা
দেরি কেনো। চাক্কু ছাড়াই কোপ মারার সুযোগ রয়েছে যখন 🧐
Really awesome!
First of all thanks. But I'm a bit confused about when counting index. what is the value of 0 index? Is that 1?
yes. Index always starts with 0 in javascript
video deika deika jaiga ar comment korte mon thake na
It’s ok vai. Video dekhe upokar holei cholbe. Jodi valo lage, subscribe koro
var numbers = [1, 2, 3, 4, 5];
var result = numbers.slice(2, -2);
console.log(result);
sir ekhane tw kopoi pore nai..... output keno [3] dekhche??? output na [ ] asar kotha??
(2, -2)
2 means [1,2] kata.
-2 means [5,4] kata back theke.
majhe [3] thake. so ans: [3]
from the example at 2:35
(-1, 3)
-1 means [5] kata back theke.
3 means [1,2,3,4] kata.
majhe thake []. so ans:[]
note: slice(first, second)
first=>included the last index. if first =-1, so 5 is included
second=>excluded the last index. if second = 3, so 4 is excluded
Array কোপা শামসু() method