Като се използва набор в javascript

Примерен код

157
0

масив javascript

//create an array like so:
var colors = ["red","blue","green"];

//you can loop through an array like this:
for (var i = 0; i < colors.length; i++) {
    console.log(colors[i]);
}
4
0

как да обявим масив в javascript

var array = [item1, item2, .....];
/*

  item1 and item2 could be a string (which is 
  a letter written in double or single quotes like this "string" or 'string') or 
  a number (which is just a normal number on the keypad) or a boolean (which is 
  an experssion which either returns to true of false) and the ..... means that 
  the inputs can be infinite.
  
*/
2
0

като се създаде масив в javascript


let myVar = ["1","2","3"];

Подобни страници

Подобни страници с примери

На други езици

Тази страница на други езици

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Íslensk
..................................................................................................................