const items = [1,2,3,4,5,6];
      const firstThreeItems = items.slice(0, 3);
      Javascript language logo

      Get items from array

      My JavaScript recipes

      Get the first n items of an array

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.