✨ 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 Basics (Retired)
    • Creating Reusable Code with Functions
    • Getting Information From a Function
    • Close
  • kyuss
    kyuss
    2,314 Points

    Using a random number value to store in a variable

    Posted on Dec 25, 2019 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 on Dec 2, 2019 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 on Aug 24, 2018 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 on Jun 13, 2018 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 on Nov 28, 2017 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 on Aug 23, 2017 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 on Aug 17, 2017 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 on Jul 5, 2017 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 on Jul 3, 2017 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 on May 24, 2017 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 on Apr 22, 2017 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 on Mar 20, 2017 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 on Nov 2, 2016 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 on Aug 25, 2016 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 on Jul 14, 2016 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 on Jul 8, 2016 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 on Jun 24, 2016 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 on May 8, 2016 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 on May 3, 2016 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 on Dec 15, 2015 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 on Jul 24, 2015 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 on Jul 1, 2015 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 on May 15, 2015 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 on Apr 13, 2015 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 on Feb 25, 2015 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 on Feb 12, 2015 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 on Jan 13, 2015 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 on Nov 19, 2014 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 on Nov 19, 2014 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.