“I w JavaScript” Kod odpowiedzi

JavaScript za

const array = ['hello', 'world', 'of', 'Corona'];

for (const item of array) {
  console.log(item);
}
2 Programmers 1 Bug

I w JavaScript

"i" is a temporary variable used to store the integer value of the current position in the range of the for loop that only has scope within its for loop. You could use any other variable name in place of "i" such as "count" or "x" or "number".
Powerful Peacock

I w JavaScript

The variable i in the anonymous function declaration function(i) is the name used for the first parameter inside the function body. It does not correspond to any variable elsewhere in your page.
Powerful Peacock

Odpowiedzi podobne do “I w JavaScript”

Pytania podobne do “I w JavaScript”

Więcej pokrewnych odpowiedzi na “I w JavaScript” w JavaScript

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu