JAVASCRIPT Tutorial
وفيما يلي مثال بسيط بلغة جافا سكريبت يوضح كيفية إزالة أول عنصر من مصفوفة وإعادته:
const fruits = ["apple", "banana", "orange"];
const removedFruit = fruits.shift();
console.log(removedFruit); // apple
console.log(fruits); // ["banana", "orange"]