Answer the question
In order to leave comments, you need to log in
How to display the elements of an array?
Hello, stupid question, but it’s impossible to do the following normally - for example, we have an array of 10 elements {1,2,3,4,5,6,7,8,9,10} we need to display in this order {3,5,7,9,1} exactly like that. Preferably in php, but you can use other languages as an example.
Answer the question
In order to leave comments, you need to log in
people, if it's not difficult, please write a solution in javascript
// ыыыы
array=[1,2,3,4,5,6,7,8,9,10]
out=''
for(i = 2;i < 10;i += 2)
out = out + ' ' + array[i];
out = out + ' ' + array[0];
WScript.echo(out);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question