[][src]Function boa::builtins::array::slice

pub fn slice(
    this: &Value,
    args: &[Value],
    interpreter: &mut Interpreter
) -> ResultValue

Array.prototype.slice ( [begin[, end]] )

The slice method takes two arguments, start and end, and returns an array containing the elements of the array from element start up to, but not including, element end (or through the end of the array if end is undefined). If start is negative, it is treated as length + start where length is the length of the array. If end is negative, it is treated as length + end where length is the length of the array. https://tc39.es/ecma262/#sec-array.prototype.slice