Array.splice 是不纯的函数,有副作用
arr.splice(0,2) < [1,2]
arr.splice(0,2) < [3]
arr.splice(0,2) < []
//es6
var checkage = age => age > 18;
原文链接:/js/415559.html
Array.splice 是不纯的函数,有副作用
arr.splice(0,2) < [1,2]
arr.splice(0,2) < [3]
arr.splice(0,2) < []
//es6
var checkage = age => age > 18;
原文链接:/js/415559.html