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

🤑 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

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

  • 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
    • Showing results for:
    • JavaScript
    • JavaScript Array Iteration Methods
    • Array Manipulation
    • Practice filter()
    • Close
  • 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 on Jan 21, 2023 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 on Dec 24, 2022 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 on Aug 6, 2022 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 on May 7, 2022 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 on Mar 31, 2022 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 on Oct 31, 2021 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 on Apr 3, 2021 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 on Feb 9, 2021 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 on Dec 29, 2020 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 on Nov 30, 2020 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 on May 28, 2020 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 on Apr 7, 2020 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 on Feb 24, 2020 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 on Feb 8, 2020 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 on Aug 27, 2019 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 on Mar 31, 2019 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 on Mar 21, 2019 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 on Oct 12, 2018 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 on Aug 28, 2018 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 on Jun 19, 2018 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 on Mar 24, 2018 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 on Mar 10, 2018 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 on Mar 3, 2018 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 on Jan 21, 2018 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 on Oct 28, 2017 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.