🤑 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
  • Samantha McElhinney
    Samantha McElhinney
    1,931 Points

    I'm not sure why I'm getting the error identifier already defined when I'm reassigning the variable with const

    Posted January 21, 2023 2:06am by Samantha McElhinney
    Samantha McElhinney
    1,931 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Peter Huang
    Peter Huang
    5,427 Points

    Need help with this challenge

    Posted December 24, 2022 9:50pm by Peter Huang
    Peter Huang
    5,427 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Willie Morris
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Willie Morris
    Front End Web Development Techdegree Graduate 14,717 Points

    this gets the right answer but says its wrong?

    Posted August 6, 2022 11:40pm by Willie Morris
    .a{fill-rule:evenodd;}techdegree seal-36
    Willie Morris
    Front End Web Development Techdegree Graduate 14,717 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • BETUL BASKAN
    BETUL BASKAN
    152 Points

    const century20 = years.filter(number => number <= 2000); console.log(century20); why doesnt work?

    Posted May 7, 2022 6:18am by BETUL BASKAN
    BETUL BASKAN
    152 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Cole Smith
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Cole Smith
    Web Development Techdegree Student 13,802 Points

    how do I properly return this new array?

    Posted March 31, 2022 6:12pm by Cole Smith
    .a{fill-rule:evenodd;}techdegree
    Cole Smith
    Web Development Techdegree Student 13,802 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Keytron Brown
    Keytron Brown
    15,828 Points

    Help I dont know what to do next.

    Posted October 31, 2021 6:15pm by Keytron Brown
    Keytron Brown
    15,828 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Hanwen Zhang
    Hanwen Zhang
    20,084 Points

    Why my code is not working here?

    Posted April 3, 2021 3:04pm by Hanwen Zhang
    Hanwen Zhang
    20,084 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Stephen Garcia
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Stephen Garcia
    Python Development Techdegree Student 11,647 Points

    Using the filter method on the years array, return an array of only the years in the twentieth century

    Posted February 9, 2021 2:38am by Stephen Garcia
    .a{fill-rule:evenodd;}techdegree
    Stephen Garcia
    Python Development Techdegree Student 11,647 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    2 Answers

  • Gata Gbemou
    Gata Gbemou
    364 Points

    filter method on century20, keep getting error

    Posted December 29, 2020 6:28pm by Gata Gbemou
    Gata Gbemou
    364 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    2 Answers

  • srinivas gudimella
    srinivas gudimella
    1,753 Points

    how to filter not 20th centuries from the years array

    Posted November 30, 2020 8:03pm by srinivas gudimella
    srinivas gudimella
    1,753 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Jiten Mehta
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Jiten Mehta
    Front End Web Development Techdegree Graduate 21,209 Points

    Is there a way to refactor this code?

    Posted May 28, 2020 2:14pm by Jiten Mehta
    .a{fill-rule:evenodd;}techdegree seal-36
    Jiten Mehta
    Front End Web Development Techdegree Graduate 21,209 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Tadjiev Codes
    Tadjiev Codes
    9,626 Points

    Using the filter method on the years array, return an array of only the years in the twentieth century (remember: the tw

    Posted April 7, 2020 9:18am by Tadjiev Codes
    Tadjiev Codes
    9,626 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    2 Answers

  • Christopher Evans
    Christopher Evans
    9,896 Points

    Can't get filtering right, but I feel like I'm close!

    Posted February 24, 2020 4:54pm by Christopher Evans
    Christopher Evans
    9,896 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    2 Answers

  • Evgeniya Chernaya
    Evgeniya Chernaya
    11,895 Points

    Can't find the problem, why my code doesn't work

    Posted February 8, 2020 5:00pm by Evgeniya Chernaya
    Evgeniya Chernaya
    11,895 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    2 Answers

  • victor E
    victor E
    19,146 Points

    storing an array after filtering from another array

    Posted August 27, 2019 1:20pm by victor E
    victor E
    19,146 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Khumoyunmirzo Nosirov
    Khumoyunmirzo Nosirov
    8,689 Points

    can Anyone help me , please

    Posted March 31, 2019 11:25am by Khumoyunmirzo Nosirov
    Khumoyunmirzo Nosirov
    8,689 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    2 Answers

  • Evan Loiterman
    Evan Loiterman
    4,315 Points

    why is this wrong?

    Posted March 21, 2019 8:31pm by Evan Loiterman
    Evan Loiterman
    4,315 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    3 Answers

  • Andrew Courey
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Andrew Courey
    Front End Web Development Techdegree Graduate 15,310 Points

    Is my solution correct?

    Posted October 12, 2018 5:15am by Andrew Courey
    .a{fill-rule:evenodd;}techdegree seal-36
    Andrew Courey
    Front End Web Development Techdegree Graduate 15,310 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Humoyunmirzo Nosirov
    PLUS
    Humoyunmirzo Nosirov
    Courses Plus Student 5,154 Points

    Need some help;

    Posted August 28, 2018 2:51pm by Humoyunmirzo Nosirov
    Humoyunmirzo Nosirov
    Courses Plus Student 5,154 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Madeline Yao
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Madeline Yao
    Full Stack JavaScript Techdegree Student 9,611 Points

    What is the Bug in the Code?

    Posted June 19, 2018 1:42am by Madeline Yao
    .a{fill-rule:evenodd;}techdegree
    Madeline Yao
    Full Stack JavaScript Techdegree Student 9,611 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

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

    Code return true instead of filtered array

    Posted March 24, 2018 8:01pm by ammarkhan
    .a{fill-rule:evenodd;}techdegree
    ammarkhan
    Front End Web Development Techdegree Student 21,661 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

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

    century20.push isn't a function

    Posted March 10, 2018 4:08pm by ammarkhan
    .a{fill-rule:evenodd;}techdegree
    ammarkhan
    Front End Web Development Techdegree Student 21,661 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Jason Dsouza
    Jason Dsouza
    1,378 Points

    How can i solve this?

    Posted March 3, 2018 9:09am by Jason Dsouza
    Jason Dsouza
    1,378 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Tshering Tamang
    Tshering Tamang
    3,492 Points

    says you change the code..

    Posted January 21, 2018 1:19am by Tshering Tamang
    Tshering Tamang
    3,492 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    1 Answer

  • Anik Devaughn
    Anik Devaughn
    7,751 Points

    Challenge Task 1 of 1 Using the filter method on the years array, return an array of only the years in the twentieth...

    Posted October 28, 2017 7:56pm by Anik Devaughn
    Anik Devaughn
    7,751 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()

    3 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.