Thuta Learning
JavaScript
IntermediateProgrammingbeginner

JS Arrays

Arrays များသည် items အများအပြားကို variable တစ်ခုတည်းမှာ သိမ်းဆည်းရန်သုံးသည်။ Array methods များ (push, pop, forEach, map) ဖြင့် data များကို လွယ်ကူစွာစီမံနိုင်သည်။

javascript
const fruits = ["Banana", "Orange", "Apple"];

// Add a new item to the end
fruits.push("Mango");

// Loop through the array
fruits.forEach(function(fruit) {
  console.log("I like " + fruit);
});
You should see
I like Banana I like Orange I like Apple I like Mango
JS Arrays | Thuta Learning