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.

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

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

  • 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
  • Magan Tyson
    Magan Tyson
    1,286 Points

    My code works when I remove the ";".

    Posted September 1, 2024 4:16pm by Magan Tyson
    Magan Tyson
    1,286 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • Andrew Terrett
    Andrew Terrett
    2,080 Points

    Alert box is not popping up for me can someone check my code?

    Posted February 21, 2024 4:44pm by Andrew Terrett
    Andrew Terrett
    2,080 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    2 Answers

  • Megan Chen
    Megan Chen
    7,406 Points

    Simplify the code, but not work

    Posted September 30, 2023 11:09pm by Megan Chen
    Megan Chen
    7,406 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • David Douglas
    David Douglas
    3,719 Points

    Calling function vs stored in variable

    Posted June 15, 2022 4:58pm by David Douglas
    David Douglas
    3,719 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • Adrian Rojas-Baez
    Adrian Rojas-Baez
    3,741 Points

    Why does the statement if (fieldTest) { } return true? Does if(x) {} always return a true statement?

    Posted April 13, 2022 5:03am by Adrian Rojas-Baez
    Adrian Rojas-Baez
    3,741 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • Hina K.
    Hina K.
    4,807 Points

    Why is my alert box not popping up?

    Posted March 22, 2022 5:01pm by Hina K.
    Hina K.
    4,807 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    2 Answers

  • Geovani Mejia
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Geovani Mejia
    Front End Web Development Techdegree Student 7,940 Points

    Why are we are the value property to the field?

    Posted March 18, 2022 10:42pm by Geovani Mejia
    .a{fill-rule:evenodd;}techdegree
    Geovani Mejia
    Front End Web Development Techdegree Student 7,940 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • jcruzaxaeon
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    jcruzaxaeon
    Full Stack JavaScript Techdegree Student 16,520 Points

    What is the purpose of # in argument: document.querySelector('#info')

    Posted February 25, 2022 8:31am by jcruzaxaeon
    .a{fill-rule:evenodd;}techdegree
    jcruzaxaeon
    Full Stack JavaScript Techdegree Student 16,520 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    2 Answers

  • Jason Papenmeier
    PLUS
    Jason Papenmeier
    Courses Plus Student 780 Points

    I am curious as to why the noAlert() function does not return a value in the latter part of the code snippet.

    Posted January 12, 2022 3:00pm by Jason Papenmeier
    Jason Papenmeier
    Courses Plus Student 780 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • ja5on
    ja5on
    10,339 Points

    Is it ok to get undefined?

    Posted May 29, 2021 11:53am by ja5on
    ja5on
    10,339 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • Esther AlQaisi
    Esther AlQaisi
    2,311 Points

    Alert box not appearing, even after I removed the value attribute from the input element. Help!

    Posted April 27, 2021 12:38pm by Esther AlQaisi
    Esther AlQaisi
    2,311 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    2 Answers

  • Kendall McCall
    Kendall McCall
    8,177 Points

    My alert is not working can someone spot my error?

    Posted January 5, 2021 1:38am by Kendall McCall
    Kendall McCall
    8,177 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    2 Answers

  • terry okey
    terry okey
    3,187 Points

    I'm not sure about the exclamation point operator

    Posted December 2, 2020 5:35am by terry okey
    terry okey
    3,187 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • Kirt Perez
    Kirt Perez
    7,374 Points

    Can someone elaborate 5:50?

    Posted October 15, 2020 6:57am by Kirt Perez
    Kirt Perez
    7,374 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • ja5on
    ja5on
    10,339 Points

    Strictly or !not operator.

    Posted July 7, 2020 9:15pm by ja5on
    ja5on
    10,339 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • Ryan Soeder
    Ryan Soeder
    11,056 Points

    6:20 - Why only display the alert?

    Posted May 28, 2020 3:39pm by Ryan Soeder
    Ryan Soeder
    11,056 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    2 Answers

  • Elliot Case
    Elliot Case
    9,032 Points

    Can not get the alert box to pop up

    Posted April 18, 2020 10:32am by Elliot Case
    Elliot Case
    9,032 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    1 Answer

  • Oksana Koyfman
    Oksana Koyfman
    10,521 Points

    Why we don't simply return !field.value?

    Posted April 12, 2020 5:27pm by Oksana Koyfman
    Oksana Koyfman
    10,521 Points
    • JavaScript
    • JavaScript Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements

    2 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