Return Part of an Array Using the slice Method - Functional Programming - Free Code Camp

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Thank you so much for this lesson Mr. Ian
function sliceArray(anim, beginSlice, endSlice) {
return anim.slice(beginSlice, endSlice);
}
const inputAnim = ["Cat", "Dog", "Tiger", "Zebra", "Ant"];
let a = sliceArray(inputAnim, 1, 3);
console.log(a);

zken
Автор

Thank You Sir, for your video's... Some of the tests on Free Code Camp, take me DAYS to solve. I couldn't do it without your help! It says only change the code Above or Below the lines provided... and then I see you add your own console statements to help solve the problem. Free Code Camp does not teach us that... YOU DO!!! THANK YOU!!!

labombarde
Автор

console.log(inputAnim.slice(1, 4)) this work but it keep refusing my solution why??

thexinvisiblex
Автор

The simplicity killed my brain cells, I tried every if staetment I could think of

shahar-ha-ole