//1 variant
var
ara0 = [];
ara0[0] = 1;
ara0[1] = 2;
ara0[2] = 3;
ara0[3] = 4;
ara0[4] = 5;
//2 variant
ara1 = [1, 2, 3, 4, 5];
//3 variant
ara2 = Array();
ara2[0] = 1;
ara2[1] = 2;
ara2[2] = 3;
ara2[3] = 4;
ara2[4] = 5;
//4 variant
ara3 = Array(1, 2, 3, 4, 5);
ara4 = [10, 0.2802,
true
,
'Hello World!'
, {x:300, y:
'Привет Мир!'
}];
function
funMake() {
for
(
i=0; i<ara0.length; i++) {
document.write(ara0[i] +
' '
);
}
document.write(
'<br />'
i=0; i<ara1.length; i++) {
document.write(ara1[i] +
i=0; i<ara2.length; i++) {
document.write(ara2[i] +
i=0; i<ara3.length; i++) {
document.write(ara3[i] +
document.write(ara4[0] +
document.write(ara4[1] +
document.write(ara4[2] +
document.write(ara4[3] +
document.write(ara4[4].x +
document.write(ara4[4].y +
//1 variant var ara0 = []; ara0[0] = 1; ara0[1] = 2; ara0[2] = 3; ara0[3] = 4; ara0[4] = 5; //2 variant var ara1 = [1, 2, 3, 4, 5]; //3 variant var ara2 = Array(); ara2[0] = 1; ara2[1] = 2; ara2[2] = 3; ara2[3] = 4; ara2[4] = 5; //4 variant var ara3 = Array(1, 2, 3, 4, 5); var ara4 = [10, 0.2802, true, 'Hello World!', {x:300, y:'Привет Мир!'}]; function funMake() { for(var i=0; i'); for(var i=0; i'); for(var i=0; i'); for(var i=0; i'); document.write(ara4[0] + ''); document.write(ara4[1] + ''); document.write(ara4[2] + ''); document.write(ara4[3] + ''); document.write(ara4[4].x + ''); document.write(ara4[4].y + ''); }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
funMake();