Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Cody Norman
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Cody Norman
    Full Stack JavaScript Techdegree Student 3,421 Points

    Removing Items From Arrays

    Posted June 13, 2020 4:34am by Cody Norman
    .a{fill-rule:evenodd;}techdegree
    Cody Norman
    Full Stack JavaScript Techdegree Student 3,421 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

  • Eduardo Vargas
    Eduardo Vargas
    5,871 Points

    Semicolon or no semicolon?

    Posted September 2, 2019 9:01pm by Eduardo Vargas
    Eduardo Vargas
    5,871 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

  • Anna Khodun
    Anna Khodun
    5,476 Points

    more about "ethO" .

    Posted July 4, 2018 9:55am by Anna Khodun
    Anna Khodun
    5,476 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    2 Answers

  • Adam Maley
    Adam Maley
    5,946 Points

    Unshift vs shift...poor choice of naming.

    Posted May 2, 2018 9:24pm by Adam Maley
    Adam Maley
    5,946 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    3 Answers

  • Aakash Srivastav
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Aakash Srivastav
    Full Stack JavaScript Techdegree Student 11,638 Points

    Removing Items From Array

    Posted April 25, 2018 8:21am by Aakash Srivastav
    .a{fill-rule:evenodd;}techdegree
    Aakash Srivastav
    Full Stack JavaScript Techdegree Student 11,638 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

  • seong lee
    seong lee
    4,503 Points

    cant you just do this: var number = [1,2,3,4,5,6] number.pop(2)

    Posted November 16, 2017 3:53am by seong lee
    seong lee
    4,503 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    4 Answers

  • Enemuo Felix
    Enemuo Felix
    1,895 Points

    Removing Items from an Array

    Posted September 18, 2017 4:08pm by Enemuo Felix
    Enemuo Felix
    1,895 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    2 Answers

  • Daiane Silva
    Daiane Silva
    5,668 Points

    Well, I can remove items from the beginning and the end of my array, but If I want to remove the item in the middle?

    Posted July 14, 2017 12:46am by Daiane Silva
    Daiane Silva
    5,668 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

  • Abhijit Das
    Abhijit Das
    5,022 Points

    How to get previous object of the last item from the array list?

    Posted July 3, 2017 2:32pm by Abhijit Das
    Abhijit Das
    5,022 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    3 Answers

  • artdesiatnik
    artdesiatnik
    2,329 Points

    why "length" is a property and not a method like pop or shift?

    Posted January 11, 2017 3:18pm by artdesiatnik
    artdesiatnik
    2,329 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    2 Answers

  • Blaize Lange
    Blaize Lange
    2,298 Points

    are push() and unshift() only really useful in more complicated code?

    Posted January 10, 2017 6:20am by Blaize Lange
    Blaize Lange
    2,298 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

  • Chris Harkin
    Chris Harkin
    1,104 Points

    Removing items from arrays Challenge Task 1

    Posted May 19, 2016 4:32pm by Chris Harkin
    Chris Harkin
    1,104 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

  • Chris Harkin
    Chris Harkin
    1,104 Points

    Removing items from arrays Challenge Task 1

    Posted May 19, 2016 4:32pm by Chris Harkin
    Chris Harkin
    1,104 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    8 Answers

  • A X
    A X
    12,842 Points

    For Treehouse Team: A Video Transcript Typo that Needs to be Fixed

    Posted April 12, 2016 4:19pm by A X
    A X
    12,842 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

  • Howie Yeo
    PLUS
    Howie Yeo
    Courses Plus Student 3,639 Points

    Removing more than 1 element using pop and shift method?

    Posted July 11, 2015 2:15pm by Howie Yeo
    Howie Yeo
    Courses Plus Student 3,639 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    3 Answers

  • Abe Layee
    Abe Layee
    8,378 Points

    Is it possible to specify which item to remove from an array using the pop() or shift() method.

    Posted July 9, 2015 7:51pm by Abe Layee
    Abe Layee
    8,378 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    2 Answers

  • jessicapei
    jessicapei
    7,885 Points

    Why is the JavaScript console in Chrome some times grayed out (I cannot open it)? How can I fix this?

    Posted July 6, 2015 10:18pm by jessicapei
    jessicapei
    7,885 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

  • Keith Greatz
    Keith Greatz
    4,377 Points

    .push and .unshift command returns value of length?

    Posted June 21, 2015 3:20am by Keith Greatz
    Keith Greatz
    4,377 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

  • Margaret James
    Margaret James
    9,444 Points

    Retrieving removed variable for New Array

    Posted June 2, 2015 5:44pm by Margaret James
    Margaret James
    9,444 Points
    • JavaScript
    • JavaScript Loops, Arrays and Objects
    • Tracking Multiple Items with Arrays
    • Removing Items From Arrays

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord