Javascript o pole

Príklady kódu

2
0

N

const array = [1, 2, 3];array.forEach(function(elem, index, array) {    array[index] = elem * 2;});console.log(array); // [2,4,6]
1
0

N

The Array. of() method creates a new Array instance from a variable number of 
arguments, regardless of number or type of the arguments. The difference between
Array. of() and the Array constructor is in the handling of integer arguments: Array.
0
0

N

const array = [1,2,3,4,5];const evenNumbers = array.filter(function(elem) {   // expressions that return 'true' are retained   return elem % 2 == 0;});
0
0

N

Array.of(7); // [7]
Array(7); // array of 7 empty slots

Array.of(1, 2, 3); // [1, 2, 3]
Array(1, 2, 3);    // [1, 2, 3]
-1
0

N

String[][] arrays = new String[][] { array1, array2, array3, array4, array5 };

Podobné stránky

Podobné stránky s príkladmi

V iných jazykoch

Táto stránka je v iných jazykoch

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