"push,unshift,remove,ensure".replace(/\w+/g, function(method) {
vm[method] = function(e) {
if (this.value && e.which == 13) {//this為input元素
vm.array[method](this.value);
this.value = "";
}
}
})
這段代碼啥意思?es6寫法?
Javascript代碼的小小疑問(48)
慕碼人2483693
2018-12-06 20:31:31