The function is expected to return an INTEGER_ARRAY. Do not use the built in Array.slice() function! Slices array from the start index up to, but not including, the end index. The slice() method selects from a given start, up to a (not inclusive) given end. If the third parameter is greater than the length of the array, it should slice until the end of the array. The slice() method returns selected elements in an array, as a new array. The function should return a new array with the elements starting at the index of the first number and going until the index of the second number. Write a function called slice, which accepts an array, and two numbers. O mtodo slice() retorna uma cpia de parte de um array a partir de um subarray criado entre as posies incio e fim (fim no includo) de um array original. I think I'm over thinking a lot of things, but I need help, I'm new at this and I'm close to crying! Haha! Sorry about the backticks idk how to format codeblocks sorry! This is Javascript btw!! In my coding class I have a homework question that I'm stuck on!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |