✨ 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 Functions
    • Create Reusable Code with Functions
    • Using Multiple return Statements
    • Close
  • Magan Tyson
    Magan Tyson
    1,286 Points

    My code works when I remove the ";".

    Posted on Sep 1, 2024 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 on Feb 21, 2024 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 on Sep 30, 2023 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 on Jun 15, 2022 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 on Apr 13, 2022 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 on Mar 22, 2022 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 on Mar 18, 2022 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 on Feb 25, 2022 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 on Jan 12, 2022 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,338 Points

    Is it ok to get undefined?

    Posted on May 29, 2021 by ja5on
    ja5on
    10,338 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 on Apr 27, 2021 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 on Jan 5, 2021 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 on Dec 2, 2020 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 on Oct 15, 2020 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,338 Points

    Strictly or !not operator.

    Posted on Jul 7, 2020 by ja5on
    ja5on
    10,338 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 on May 28, 2020 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 on Apr 18, 2020 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 on Apr 12, 2020 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.

    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.