代码
var arr = new Array(6) arr[0] = "George" arr[1] = "John" arr[2] = "Thomas" arr[3] = "James" arr[4] = "Adrew" arr.slice(0,3)
和pyhon一样,左包含,又不包含,字符串也支持,因为字符串是特殊的数组
原文地址:https://www.cnblogs.com/robinunix/p/11649922.html
时间: 2024-10-07 15:46:07
代码
var arr = new Array(6) arr[0] = "George" arr[1] = "John" arr[2] = "Thomas" arr[3] = "James" arr[4] = "Adrew" arr.slice(0,3)
和pyhon一样,左包含,又不包含,字符串也支持,因为字符串是特殊的数组
原文地址:https://www.cnblogs.com/robinunix/p/11649922.html