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

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

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

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • 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
  • Hanwen Zhang
    Hanwen Zhang
    20,084 Points

    ('li:last-child') what does the : and the name of last-child work here?

    Posted March 28, 2021 11:57pm by Hanwen Zhang
    Hanwen Zhang
    20,084 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Karl Russell Sumando Menil
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Karl Russell Sumando Menil
    Full Stack JavaScript Techdegree Student 4,004 Points

    code does not remove last item

    Posted February 11, 2021 1:37am by Karl Russell Sumando Menil
    .a{fill-rule:evenodd;}techdegree
    Karl Russell Sumando Menil
    Full Stack JavaScript Techdegree Student 4,004 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Faustin Ukundimana
    Faustin Ukundimana
    3,489 Points

    Can you guide me on how to get practice questions in one place

    Posted December 14, 2020 3:17pm by Faustin Ukundimana
    Faustin Ukundimana
    3,489 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    0 Answers

  • omar hama
    PLUS
    omar hama
    Courses Plus Student 2,773 Points

    Cannot read property 'addEventListener' of null

    Posted August 28, 2020 8:49pm by omar hama
    omar hama
    Courses Plus Student 2,773 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • MOSHE SCHWIMMER
    MOSHE SCHWIMMER
    6,301 Points

    Removing a element, through querySelector, then selecting the element, and the .length

    Posted June 16, 2020 11:05pm by MOSHE SCHWIMMER
    MOSHE SCHWIMMER
    6,301 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Jure Matković
    Jure Matković
    4,558 Points

    Removing Nodes

    Posted June 4, 2020 9:21pm by Jure Matković
    Jure Matković
    4,558 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Joel Greek
    Joel Greek
    4,421 Points

    Here is a solution for removing specific list Item.

    Posted October 4, 2019 9:41am by Joel Greek
    Joel Greek
    4,421 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Alexander D
    Alexander D
    8,685 Points

    Remove last child from another </ul> list

    Posted June 23, 2019 9:36pm by Alexander D
    Alexander D
    8,685 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Andrea Gylling
    Andrea Gylling
    2,796 Points

    Uncaught TypeError: Cannot read property 'addEventListener' of null at app.js:40

    Posted April 15, 2019 2:45pm by Andrea Gylling
    Andrea Gylling
    2,796 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Serge Zant
    Serge Zant
    10,420 Points

    Whats wrong with my code?

    Posted August 19, 2018 9:36am by Serge Zant
    Serge Zant
    10,420 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    3 Answers

  • Gremyko Coleman
    Gremyko Coleman
    9,756 Points

    remove li, code works on the treehouse workspace, but when do the same code in notepad++ it doesn't remove the li tags

    Posted August 6, 2018 6:28am by Gremyko Coleman
    Gremyko Coleman
    9,756 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Harrison Greeves
    Harrison Greeves
    2,920 Points

    My remove button won't remove the added item

    Posted July 11, 2018 12:49pm by Harrison Greeves
    Harrison Greeves
    2,920 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Jake Kobs
    Jake Kobs
    9,215 Points

    Why won't firstChild work for the code challenge?

    Posted May 30, 2018 10:04pm by Jake Kobs
    Jake Kobs
    9,215 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Jake Kobs
    Jake Kobs
    9,215 Points

    Why do we have [0] after the "document.getElementByTagName("ul")[0];"?

    Posted May 29, 2018 12:51am by Jake Kobs
    Jake Kobs
    9,215 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • S Campos
    S Campos
    413 Points

    Removing the last div within a div

    Posted March 27, 2018 1:43am by S Campos
    S Campos
    413 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    2 Answers

  • sam poplack
    sam poplack
    9,467 Points

    null is not an object

    Posted January 16, 2018 6:24am by sam poplack
    sam poplack
    9,467 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    2 Answers

  • Mariela Napoles
    Mariela Napoles
    13,434 Points

    How Do I practice all the lessons I am learning?

    Posted January 12, 2018 5:00am by Mariela Napoles
    Mariela Napoles
    13,434 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    3 Answers

  • Daniel Fitzhugh
    Daniel Fitzhugh
    9,715 Points

    How to "select all <li> elements with getElementsByTagName and use length of the collection to access the last element"?

    Posted December 13, 2017 4:18pm by Daniel Fitzhugh
    Daniel Fitzhugh
    9,715 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    2 Answers

  • ammarkhan
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    ammarkhan
    Front End Web Development Techdegree Student 21,661 Points

    Remove button just removing last button

    Posted November 14, 2017 2:41pm by ammarkhan
    .a{fill-rule:evenodd;}techdegree
    ammarkhan
    Front End Web Development Techdegree Student 21,661 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Henry Stiltner
    Henry Stiltner
    4,178 Points

    Check if a certain element exists

    Posted September 3, 2017 11:43pm by Henry Stiltner
    Henry Stiltner
    4,178 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    2 Answers

  • Khadar Abdulahi
    Khadar Abdulahi
    1,955 Points

    Remove item not working

    Posted June 14, 2017 1:29am by Khadar Abdulahi
    Khadar Abdulahi
    1,955 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • gennady
    gennady
    14,145 Points

    Why can't I choose last 'li' element from 'ul' using ul.lastChild?

    Posted March 13, 2017 1:17pm by gennady
    gennady
    14,145 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    1 Answer

  • Sudip Paudel
    Sudip Paudel
    2,203 Points

    The existing list items are removed when clicked on them but not the newly added items.

    Posted February 24, 2017 9:44pm by Sudip Paudel
    Sudip Paudel
    2,203 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    2 Answers

  • John Baldwin
    John Baldwin
    7,969 Points

    "Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'." error message

    Posted December 13, 2016 5:24pm by John Baldwin
    John Baldwin
    7,969 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    4 Answers

  • Luca Di Pinto
    Luca Di Pinto
    8,051 Points

    Remove the list item element stored in firstListItem from the DOM.

    Posted December 3, 2016 2:41pm by Luca Di Pinto
    Luca Di Pinto
    8,051 Points
    • JavaScript
    • JavaScript and the DOM (Retiring)
    • Making Changes to the DOM
    • Removing Nodes

    2 Answers

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

    Treehouse

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

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.