javascript - using .slice method on an array -
I'm practicing the array of JavaScript Koan and I'm not fully understanding why these answers are correct. I have added my beliefs below, if someone can explain to me / tell me that I am wrong:
it should "slice arrays", function () {var array = [ Excerpt ([]]; Why do so Will not the least piece "jelly" begin with piece 3, how does the cut of 0 change it empty?
Hope (array.slice (3, 100)) .toEqual (["jelly"]); If cut off If the index is beyond the current in the array, does it mean that all the indexes starting from 3 until the end of a new array array created from slices?
Expect (array.slice (5, 1)). ToEqual ([undefined]; Will this always be undefined if the start index is not present in the array?
});
The second argument is that App er is connected to a piece
e Think
Comments
Post a Comment