Answers for "js clear a created list"

1

js clear a created list

function removeAll(){
    document.getElementById("checkList").innerHTML = "";
}
Posted by: Guest on December-24-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
2

empty array js

// define Array
let list = [1, 2, 3, 4];
function empty() {
    //empty your array
    list = [];
}
empty();
Posted by: Guest on June-01-2020
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