Answer the question
In order to leave comments, you need to log in
The simplest array creation in JavaScript?
The situation after PHP in the field of creating an array became rather incomprehensible.
Previously, I could apply to an example in a loop: arr[number] = response;
Where, number - will be any number, for example 1000 or 1350.
How to create such an array in JavaScript?
For example:
var images = [];
images[number] = response;
Answer the question
In order to leave comments, you need to log in
https://learn.javascript.ru/data-structures
Probably the best tutorial I've ever seen, find about arrays, everything is super clear
What's the problem?
var images = []; // []
images[130] = "hello, world"; // [undefined x 130, "hello, world"]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question