syntax error array.slice