Get the App
SLTechnology News&Howtos  ›  Development  › 

The basic usage of JS array

Shulou Source: shulou.com Published: 2022-06-03 11:18:10 11月15日 Update

This article mainly introduces "the basic usage of JS array". In daily operation, I believe many people have doubts about the basic usage of JS array. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "basic usage of JS array". Next, please follow the editor to study!

Instance:

Js array / / array var arr= [5]; console.log (arr); var arr= [true]; console.log (arr); var arr1=new Array (5); arr1.length=10; arr1 [0] = 3; arr1 [1] = true; arr1 [2] = "bingo"; console.log (arr1 [2]); arr1 [3] = new Date (); console.log (arr1); arr1.length=2; console.log (arr1); arr1.length=10 / / Array traversal: low-level traversal, high-level traversal for (var nomenclature n

Tags: Array data type learning advanced way more help different low-level practical next subscript only article method standard value theory knowledge article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Microsoft MariaDB OPPO Reno Huawei