🤑 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
  • kyuss
    kyuss
    2,314 Points

    Using a random number value to store in a variable

    Posted December 25, 2019 11:02pm by kyuss
    kyuss
    2,314 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • bavan .
    bavan .
    2,638 Points

    Why does my code work ?

    Posted December 2, 2019 2:27pm by bavan .
    bavan .
    2,638 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • Immanuel Jaeggi
    Immanuel Jaeggi
    5,164 Points

    The return function is tough to understand.

    Posted August 24, 2018 7:16am by Immanuel Jaeggi
    Immanuel Jaeggi
    5,164 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    3 Answers

  • Leo Penaloza
    Leo Penaloza
    8,426 Points

    Using return values

    Posted June 13, 2018 12:38am by Leo Penaloza
    Leo Penaloza
    8,426 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    2 Answers

  • Hrushikesh Vetagiri
    Hrushikesh Vetagiri
    2,646 Points

    Can we use if-else conditional statement inside the function ?

    Posted November 28, 2017 3:48pm by Hrushikesh Vetagiri
    Hrushikesh Vetagiri
    2,646 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • Owais Ul Haq
    Owais Ul Haq
    2,020 Points

    "Return" keyword in javascript

    Posted August 23, 2017 7:56am by Owais Ul Haq
    Owais Ul Haq
    2,020 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    3 Answers

  • Enemuo Felix
    Enemuo Felix
    1,895 Points

    The right way to use the 'return' keyword

    Posted August 17, 2017 5:38pm by Enemuo Felix
    Enemuo Felix
    1,895 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    4 Answers

  • john knight
    PLUS
    john knight
    Courses Plus Student 9,155 Points

    Question an help will be appreciated

    Posted July 5, 2017 5:57pm by john knight
    john knight
    Courses Plus Student 9,155 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    2 Answers

  • john knight
    PLUS
    john knight
    Courses Plus Student 9,155 Points

    Question, Any help will be appreciated

    Posted July 3, 2017 9:12am by john knight
    john knight
    Courses Plus Student 9,155 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    2 Answers

  • Sun Min
    Sun Min
    2,941 Points

    getting information from a function

    Posted May 24, 2017 9:16pm by Sun Min
    Sun Min
    2,941 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • fabianfroding
    fabianfroding
    18,491 Points

    Simplified If-statement same as == or ===?

    Posted April 22, 2017 3:14pm by fabianfroding
    fabianfroding
    18,491 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    2 Answers

  • Anudeep Nayakoti
    Anudeep Nayakoti
    2,032 Points

    I think return statements do return multiple values :

    Posted March 20, 2017 8:16pm by Anudeep Nayakoti
    Anudeep Nayakoti
    2,032 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    2 Answers

  • Siki Olaniran
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Siki Olaniran
    Data Analysis Techdegree Student 11,126 Points

    Why does the return statement call the variable name not the function name?

    Posted November 2, 2016 8:52pm by Siki Olaniran
    .a{fill-rule:evenodd;}techdegree
    Siki Olaniran
    Data Analysis Techdegree Student 11,126 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    2 Answers

  • Carleen Hall
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Carleen Hall
    Front End Web Development Techdegree Student 3,158 Points

    Getting Information from functions

    Posted August 25, 2016 7:06pm by Carleen Hall
    .a{fill-rule:evenodd;}techdegree
    Carleen Hall
    Front End Web Development Techdegree Student 3,158 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    3 Answers

  • jeroenmaljers
    jeroenmaljers
    1,708 Points

    At 5:40 in the video. Why do you need a variable? Why can't you use the function like if IsEmailIsEmpty() === true

    Posted July 14, 2016 5:56pm by jeroenmaljers
    jeroenmaljers
    1,708 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    3 Answers

  • Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points

    So the role of return is to store the value of a function?

    Posted July 8, 2016 6:24am by Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • Jonas Laberg
    Jonas Laberg
    2,365 Points

    Workspace says "Not authorized". Halp.

    Posted June 24, 2016 12:25pm by Jonas Laberg
    Jonas Laberg
    2,365 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    0 Answers

  • Abubakar Musa
    PLUS
    Abubakar Musa
    Courses Plus Student 587 Points

    Can you return more than one value, but not at once?

    Posted May 8, 2016 5:46pm by Abubakar Musa
    Abubakar Musa
    Courses Plus Student 587 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • Dogan Savran
    PLUS
    Dogan Savran
    Courses Plus Student 570 Points

    About İf clause statements and booleans

    Posted May 3, 2016 5:30pm by Dogan Savran
    Dogan Savran
    Courses Plus Student 570 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • Bianca Besciu
    Bianca Besciu
    2,105 Points

    Workspace doesn't launch

    Posted December 15, 2015 8:45am by Bianca Besciu
    Bianca Besciu
    2,105 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    0 Answers

  • john larson
    john larson
    16,594 Points

    can I separate an argument in a function to an " if else " statement?

    Posted July 24, 2015 3:54pm by john larson
    john larson
    16,594 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • Dan MacDonagh
    Dan MacDonagh
    4,615 Points

    Returning variable instead of returning calculation

    Posted July 1, 2015 3:21am by Dan MacDonagh
    Dan MacDonagh
    4,615 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • Brian Martin
    Brian Martin
    3,773 Points

    What is the point of the last example of using the return 5?

    Posted May 15, 2015 4:42am by Brian Martin
    Brian Martin
    3,773 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    2 Answers

  • Durdona Abdusamikovna
    Durdona Abdusamikovna
    1,553 Points

    I encountered with one quiz question where I don't see a function returning value

    Posted April 13, 2015 8:14pm by Durdona Abdusamikovna
    Durdona Abdusamikovna
    1,553 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    3 Answers

  • Erik Wells
    Erik Wells
    5,403 Points

    Why did I just now realize that Dave wears earrings?

    Posted February 25, 2015 8:40pm by Erik Wells
    Erik Wells
    5,403 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    7 Answers

  • Asad Sajon
    PLUS
    Asad Sajon
    Courses Plus Student 918 Points

    Why i need to use return value?

    Posted February 12, 2015 4:34pm by Asad Sajon
    Asad Sajon
    Courses Plus Student 918 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    2 Answers

  • Bla Blubb
    Bla Blubb
    2,740 Points

    return a functions

    Posted January 13, 2015 7:12pm by Bla Blubb
    Bla Blubb
    2,740 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    1 Answer

  • Tom Lawrence
    Tom Lawrence
    8,685 Points

    Return multiple things from a function

    Posted November 19, 2014 12:52pm by Tom Lawrence
    Tom Lawrence
    8,685 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    4 Answers

  • Tom Lawrence
    Tom Lawrence
    8,685 Points

    Coffee function

    Posted November 19, 2014 11:25am by Tom Lawrence
    Tom Lawrence
    8,685 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function

    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.