Answers for "clear arrays in jquery"

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
0

clear arrays in jquery

arr.splice(0, arr.length)
Posted by: Guest on January-14-2021
1

how to clear array in javascript

A.length = 0
Posted by: Guest on October-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language