Answers for "empty array jquery"

1

if array is empty jquery

var arrayName = [];

if (arrayName.length === 0) {
    // Your code
}
Posted by: Guest on November-02-2020
13

javascript empty array

arr = [];   // set array=[]

//function
const empty = arr => arr.length = 0;
//example
var arr= [1,2,3,4,5];
empty(arr) // arr=[]
Posted by: Guest on July-02-2020
1

js delete all from array

var list = [1, 2, 3, 4];
function empty() {
    //empty your array
    list.length = 0;
}
empty();
Posted by: Guest on May-07-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language