🤑 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
  • 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,236 Points

    Localstorage won't save searches

    Posted January 21, 2018 2:40pm by Sean Flanagan
    Sean Flanagan
    33,236 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
    MOD
    Jonathan Grieve
    Treehouse Moderator 91,254 Points

    Localstorage not saving searches

    Posted July 7, 2016 8:33pm by Jonathan Grieve
    Jonathan Grieve
    Treehouse Moderator 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.

    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.