//remove function을 만든다.
Array.prototype.remove = function(v) {
this.splice(this.indexOf(v) == -1 ? this.length : this.indexOf(v), 1);
}
// ex) var arr = [];
// arr.push('a');
// arr.push('b');
// arr.push('c');
arr.remove('b');
console.log(arr);
//result ['a','c']
'FrontEnd' 카테고리의 다른 글
JQuery dataTable 데이터를 가져오는 몇가지 방법 (0) | 2021.03.02 |
---|---|
get previous selectbox value (0) | 2021.02.05 |
JQuery ajax for (async : false) (0) | 2020.12.03 |
JQuery get/set active tabs (0) | 2020.11.30 |
JQuery dataTables multi select style AND language config (0) | 2020.11.23 |