js clear a created list
function removeAll(){
document.getElementById("checkList").innerHTML = "";
}arr = []; // set array=[]
//function
const empty = arr => arr.length = 0;
//example
var arr= [1,2,3,4,5];
empty(arr) // arr=[]// define Array
let list = [1, 2, 3, 4];
function empty() {
//empty your array
list = [];
}
empty();
A.length = 0
Also in JavaScript:
- expresiones ternarias javascript
- javascript greater than or equal to
- george will turn g years old in year k
- characterMapping js
- what is npm global install
- angular add bootstrap
- javascript loop through string
- get client timezone offset JavaScript
- javascript check if variable is object
- js arrays
- discord js convert timestamp to date
- react native ribbon
- js for loop
- javascript typeof
- discord.js login code
- como percorrer um objeto js
- react router dom push
- firebase update data
- node wait 10 seconds
- props vue js
- how to add oAuth google signin in react native app
- how to get MAC id of nodemcu
- string contains string javascript
- checkbox jquery checked