1. Recursion vs Iterative




  1. push(…items) Adds items to the end. Example: const fruits = [“Banana”, “Orange”, “Apple”, “Mango”];
    fruits.push(“Kiwi”);
  2. pos() Extract an item from the end. Example: const fruits = [“Banana”, “Orange”, “Apple”, “Mango”];
    fruits.pop();
  3. shift() Extract an item from the beginning. Example: const fruits = [“Banana”, “Orange”, “Apple”, “Mango”];
    fruits.shift();
  4. unshift() Adds item from the beginning. Example: const fruits = [“Banana”, “Orange”, “Apple”, “Mango”];
    fruits.unshift();
  5. splice(pos, deleteCount, ….items) At index pos delete deleteCount elements and insert items. Example: const…

Md. Rasel Hossain

Front-end Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store