Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • nauman rafique
    nauman rafique
    3,292 Points

    In case someone having hard time with the error: "Console throws error: recentSearches.forEach is not a function". Try:

    Posted January 6, 2021 8:33pm by nauman rafique
    nauman rafique
    3,292 Points
    • JavaScript
    • Local Storage Project

    0 Answers

  • Nick Huemmer
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Nick Huemmer
    Front End Web Development Techdegree Graduate 26,840 Points

    Interesting - this works in Chrome and Firefox, but not in Edge.

    Posted October 22, 2020 12:45am by Nick Huemmer
    .a{fill-rule:evenodd;}techdegree seal-36
    Nick Huemmer
    Front End Web Development Techdegree Graduate 26,840 Points
    • JavaScript
    • Local Storage Project

    0 Answers

  • sanjeshwari Nand
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    sanjeshwari Nand
    Full Stack JavaScript Techdegree Student 4,673 Points

    Why is it necessary to return true?

    Posted October 8, 2020 9:19pm by sanjeshwari Nand
    .a{fill-rule:evenodd;}techdegree
    sanjeshwari Nand
    Full Stack JavaScript Techdegree Student 4,673 Points
    • JavaScript
    • Local Storage Project

    1 Answer

  • shaun bolak
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    shaun bolak
    Front End Web Development Techdegree Graduate 18,080 Points

    What a tough video...

    Posted March 10, 2020 2:21pm by shaun bolak
    .a{fill-rule:evenodd;}techdegree seal-36
    shaun bolak
    Front End Web Development Techdegree Graduate 18,080 Points
    • JavaScript
    • Local Storage Project

    5 Answers

  • Jesse Vorvick
    Jesse Vorvick
    6,047 Points

    Why no `else` statement?

    Posted July 24, 2019 11:23pm by Jesse Vorvick
    Jesse Vorvick
    6,047 Points
    • JavaScript
    • Local Storage Project

    3 Answers

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

    questions about the code

    Posted July 15, 2019 9:40pm by <noob />
    <noob />
    17,063 Points
    • JavaScript
    • Local Storage Project

    2 Answers

  • Timothy Mattingly
    Timothy Mattingly
    15,986 Points

    Where does this Variable come from?

    Posted July 13, 2019 10:42pm by Timothy Mattingly
    Timothy Mattingly
    15,986 Points
    • JavaScript
    • Local Storage Project

    1 Answer

  • jax taylor
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    jax taylor
    Full Stack JavaScript Techdegree Student 13,166 Points

    This wont work for me. Console throws error: recentSearches.forEach is not a function. (line 85) index.html

    Posted June 5, 2019 3:32pm by jax taylor
    .a{fill-rule:evenodd;}techdegree
    jax taylor
    Full Stack JavaScript Techdegree Student 13,166 Points
    • JavaScript
    • Local Storage Project

    4 Answers

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

    Why wont this work for me?

    Posted March 3, 2019 11:02pm by Jesse Dispoto
    .a{fill-rule:evenodd;}techdegree seal-36
    Jesse Dispoto
    Front End Web Development Techdegree Graduate 14,538 Points
    • JavaScript
    • Local Storage Project

    1 Answer

  • yoav green
    yoav green
    8,611 Points

    getting the "recentSearches.forEach is not a function" error

    Posted August 22, 2018 11:06am by yoav green
    yoav green
    8,611 Points
    • JavaScript
    • Local Storage Project

    2 Answers

  • Marcus Schumacher
    Marcus Schumacher
    16,616 Points

    Trying to do something simple with Local Storage

    Posted May 18, 2018 7:27pm by Marcus Schumacher
    Marcus Schumacher
    16,616 Points
    • JavaScript
    • Local Storage Project

    1 Answer

  • Marcus Schumacher
    Marcus Schumacher
    16,616 Points

    Where can I learn more about JSON?

    Posted May 12, 2018 4:36pm by Marcus Schumacher
    Marcus Schumacher
    16,616 Points
    • JavaScript
    • Local Storage Project

    3 Answers

  • Daniel Grieve
    Daniel Grieve
    6,432 Points

    'localStorage.setItem' is not a function but 'sessionStorage.setItem' is?

    Posted April 29, 2018 1:47pm by Daniel Grieve
    Daniel Grieve
    6,432 Points
    • JavaScript
    • Local Storage Project

    1 Answer

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

    Local storage not saving search

    Posted February 12, 2018 7:26pm by Cynthia Norwood
    .a{fill-rule:evenodd;}techdegree seal-36
    Cynthia Norwood
    Front End Web Development Techdegree Graduate 15,214 Points
    • JavaScript
    • Local Storage Project

    3 Answers

  • Sean Flanagan
    Sean Flanagan
    33,237 Points

    Localstorage won't save searches

    Posted January 21, 2018 2:40pm by Sean Flanagan
    Sean Flanagan
    33,237 Points
    • JavaScript
    • Local Storage Project

    3 Answers

  • Sjoerd Vermeijden
    Sjoerd Vermeijden
    5,840 Points

    What is the difference between > -1 and > 0 in JavaScript.

    Posted November 9, 2017 3:51pm by Sjoerd Vermeijden
    Sjoerd Vermeijden
    5,840 Points
    • JavaScript
    • Local Storage Project

    3 Answers

  • Anwar Rizalman
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Anwar Rizalman
    Python Development Techdegree Graduate 33,620 Points

    Why doesn't this work on Safari?

    Posted September 11, 2017 5:28am by Anwar Rizalman
    .a{fill-rule:evenodd;}techdegree seal-36
    Anwar Rizalman
    Python Development Techdegree Graduate 33,620 Points
    • JavaScript
    • Local Storage Project

    1 Answer

  • Anwar Rizalman
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Anwar Rizalman
    Python Development Techdegree Graduate 33,620 Points

    What does it mean "when a string is not truthy"?

    Posted September 11, 2017 4:57am by Anwar Rizalman
    .a{fill-rule:evenodd;}techdegree seal-36
    Anwar Rizalman
    Python Development Techdegree Graduate 33,620 Points
    • JavaScript
    • Local Storage Project

    3 Answers

  • Sergi Oca
    Sergi Oca
    7,981 Points

    Unexpected end of input

    Posted November 28, 2016 12:34pm by Sergi Oca
    Sergi Oca
    7,981 Points
    • JavaScript
    • Local Storage Project

    1 Answer

  • Jonathan Grieve
    Jonathan Grieve
    91,254 Points

    Localstorage not saving searches

    Posted July 7, 2016 8:33pm by Jonathan Grieve
    Jonathan Grieve
    91,254 Points
    • JavaScript
    • Local Storage Project

    2 Answers

  • Patrick McDonough
    Patrick McDonough
    11,113 Points

    Unexpected Type error recentSearches.forEach is not a function.

    Posted June 23, 2016 6:43pm by Patrick McDonough
    Patrick McDonough
    11,113 Points
    • JavaScript
    • Local Storage Project

    7 Answers

  • Laurence Foley
    Laurence Foley
    16,695 Points

    When checking for localStorage support, why not just use '' if(localStorage){} '' ?

    Posted June 23, 2016 2:43pm by Laurence Foley
    Laurence Foley
    16,695 Points
    • JavaScript
    • Local Storage Project

    3 Answers

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

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord