Warum wird in JavaScript [etwas] als Array angesehen?JavaScript

Javascript-Forum
Anonymous
 Warum wird in JavaScript [etwas] als Array angesehen?

Post by Anonymous »

In JavaScript stammt die folgende Deklaration aus einer Texteingabe: < /p>

Code: Select all

numberInput = document.getElementById('number-input');
< /code>
In HTML, "Number-Input" ist Folgendes: < /p>

Die NumberInput Variable wird an eine solche Funktion übergeben:

Code: Select all

function processInputs(list)
let total = 0;
// add the items in list to a total
for (const item of list) {
total += item;
}
Warum processinputs ([numberput]) Numberput als Array/Nodelist?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post