Warum wird in JavaScript [etwas] als Array angesehen?

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Warum wird in JavaScript [etwas] als Array angesehen?

by Anonymous » 21 Mar 2025, 01:11

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?

Top