1

Temat: [JS] tablica liczby od 1..10 parzyste - wyświetlenie + suma

<script>
var tablica = [];

for (i=2; i<11; i+=2)
{
tablica[i]=i;
}

s=0;
for (i=2; i<tablica.length; i+=2)
{
s+=i;
document.write(tablica[i]+",");
}
document.write("suma: "+s);

</script>