🤑 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
  • 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 February 25, 2023 10:04am 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 August 2, 2022 7:33pm 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 November 7, 2020 12:40pm 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 June 9, 2020 7:54pm 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 March 20, 2020 1:23pm 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 March 20, 2020 1:08pm 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 January 3, 2020 1:52pm 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 July 15, 2019 2:01am 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 July 14, 2019 2:33pm 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 May 6, 2019 7:28pm 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 February 3, 2019 2:29pm 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 August 29, 2018 2:37pm 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 August 29, 2018 2:23pm 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 April 27, 2018 11:46pm 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 March 3, 2018 9:01am 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 December 12, 2017 5:14pm 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 November 1, 2017 8:12pm 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.