📚 › JavaScript: make pages do things
9. Arrays
इस लेख का अनुवाद अपने आप होगा। अभी अंग्रेज़ी में दिखाया जा रहा है।
An array stores several values in order. Positions start at 0, so the first item is arr[0]. length tells the count. push adds an item at the end.
Loop through an array with for or forEach.
उदाहरण देखें
const fruits = ["mango", "banana"];
fruits.push("jackfruit");
console.log(fruits[0], fruits.length);
✍️ अब आपकी बारी
Create an array of three colours red, green and blue, then print its length.