“Como limpar a matriz em javascript” Respostas de código

Como limpar a matriz em javascript

A.length = 0
Ugly Unicorn

Matriz vazia JS

let list = [1, 2, 3, 4];
function empty() {
    //empty your array
    list.length = 0;
}
empty();
Philan ISithembiso

Matriz vazia JS

// define Array
let list = [1, 2, 3, 4];
function empty() {
    //empty your array
    list = [];
}
empty();
Philan ISithembiso

JS exclua tudo da matriz

var list = [1, 2, 3, 4];
function empty() {
    //empty your array
    list.length = 0;
}
empty();
Xanthous Xenomorph

Respostas semelhantes a “Como limpar a matriz em javascript”

Perguntas semelhantes a “Como limpar a matriz em javascript”

Mais respostas relacionadas para “Como limpar a matriz em javascript” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código