✨ 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
    • Combining Array Methods
    • Nested Data and Additional Exploration
    • Close
  • Samuel Kleos
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Samuel Kleos
    Front End Web Development Techdegree Student 13,728 Points

    Is this approach okay? #flatten #reduce #map

    Posted on Feb 25, 2023 by Samuel Kleos
    .a{fill-rule:evenodd;}techdegree
    Samuel Kleos
    Front End Web Development Techdegree Student 13,728 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Kade Rathbun
    Kade Rathbun
    6,586 Points

    Why is the initial value set to []?

    Posted on Aug 2, 2022 by Kade Rathbun
    Kade Rathbun
    6,586 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Sam Bailey
    Sam Bailey
    8,425 Points

    Don't understand the first example

    Posted on Nov 7, 2020 by Sam Bailey
    Sam Bailey
    8,425 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Joseph Michelini
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Joseph Michelini
    Python Development Techdegree Graduate 18,692 Points

    Why does my code still work without providing the .reduce() method an initialValue?

    Posted on Jun 9, 2020 by Joseph Michelini
    .a{fill-rule:evenodd;}techdegree seal-36
    Joseph Michelini
    Python Development Techdegree Graduate 18,692 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    2 Answers

  • Begana Choi
    PLUS
    Begana Choi
    Courses Plus Student 13,126 Points

    what is the difference between those two codes?

    Posted on Mar 20, 2020 by Begana Choi
    Begana Choi
    Courses Plus Student 13,126 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Begana Choi
    PLUS
    Begana Choi
    Courses Plus Student 13,126 Points

    why concat doesn't work with {}?

    Posted on Mar 20, 2020 by Begana Choi
    Begana Choi
    Courses Plus Student 13,126 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • <noob />
    <noob />
    17,063 Points

    a question about reduce with spread operator

    Posted on Jan 3, 2020 by <noob />
    <noob />
    17,063 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • vamosrope14
    vamosrope14
    14,932 Points

    Did we need to specify the default value of the accumulator to be equal to "[]"?

    Posted on Jul 15, 2019 by vamosrope14
    vamosrope14
    14,932 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

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

    spread operator in this case

    Posted on Jul 14, 2019 by vincenzo IEVA
    .a{fill-rule:evenodd;}techdegree seal-36
    vincenzo IEVA
    Front End Web Development Techdegree Graduate 14,211 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Victor Ibasco
    Victor Ibasco
    11,035 Points

    He said, "call reduce() method on the array" and the syntax is '.array()'

    Posted on May 6, 2019 by Victor Ibasco
    Victor Ibasco
    11,035 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • yoav green
    yoav green
    8,611 Points

    why can we use .map() in the first example?

    Posted on Feb 3, 2019 by yoav green
    yoav green
    8,611 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Peter Retvari
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points

    end of the ' JavaScript Array Iteration Methods' class the practice section doesn't work

    Posted on Aug 29, 2018 by Peter Retvari
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Peter Retvari
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points

    solution with forEach ?

    Posted on Aug 29, 2018 by Peter Retvari
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    2 Answers

  • Michael Chambers
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Michael Chambers
    Full Stack JavaScript Techdegree Graduate 28,393 Points

    Question about method chaining

    Posted on Apr 27, 2018 by Michael Chambers
    .a{fill-rule:evenodd;}techdegree seal-36
    Michael Chambers
    Full Stack JavaScript Techdegree Graduate 28,393 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Sam Gord
    Sam Gord
    14,084 Points

    please check my answer to the first challenge, did it another way.

    Posted on Mar 3, 2018 by Sam Gord
    Sam Gord
    14,084 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Tony Brackins
    Tony Brackins
    28,766 Points

    Nested Data Challenge

    Posted on Dec 12, 2017 by Tony Brackins
    Tony Brackins
    28,766 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    1 Answer

  • Jordan Mor
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Jordan Mor
    Full Stack JavaScript Techdegree Graduate 31,711 Points

    Is this a more effective solution to the second challenge in this lesson?

    Posted on Nov 1, 2017 by Jordan Mor
    .a{fill-rule:evenodd;}techdegree seal-36
    Jordan Mor
    Full Stack JavaScript Techdegree Graduate 31,711 Points
    • JavaScript
    • JavaScript Array Iteration Methods
    • Combining Array Methods
    • Nested Data and Additional Exploration

    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.