_.prototype.reverse
语法:
_.prototype.reverse()
源代码链接:source
描述:
这个方法是_.reverse
的包装版本 。
注意:这种方法会改变包装数组。
开始版本:0.1.0
返回值:
(Object)
: 返回新的 lodash 包装实例。
例子:
var array = [1, 2, 3];
_(array).reverse().value()
// => [3, 2, 1]
console.log(array);
// => [3, 2, 1]
Last updated
Was this helpful?