Skip to main content

Notice: Workspaces are undergoing maintenance and are temporarily unavailable.

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • 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
  • Tadjiev Codes
    Tadjiev Codes
    9,626 Points

    Write a program that asks the user for two integer numbers. Compare the two numbers and output the higher one ????

    Posted February 10, 2020 6:16am by Tadjiev Codes
    Tadjiev Codes
    9,626 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    2 Answers

  • Jake Smith
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Jake Smith
    Data Analysis Techdegree Student 15,921 Points

    What are some use cases for function declarations vs function expressions?

    Posted July 10, 2019 2:55am by Jake Smith
    .a{fill-rule:evenodd;}techdegree
    Jake Smith
    Data Analysis Techdegree Student 15,921 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • vamosrope14
    vamosrope14
    14,932 Points

    Do you always have to write a variable for a return value?

    Posted June 5, 2019 1:59pm by vamosrope14
    vamosrope14
    14,932 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Jesse Dispoto
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Jesse Dispoto
    Front End Web Development Techdegree Graduate 14,538 Points

    Can anonymous functions only be used once in a given piece of code?

    Posted February 1, 2019 1:10am by Jesse Dispoto
    .a{fill-rule:evenodd;}techdegree seal-36
    Jesse Dispoto
    Front End Web Development Techdegree Graduate 14,538 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Nick Evershed
    Nick Evershed
    6,429 Points

    Anonymous functions

    Posted October 16, 2018 9:14am by Nick Evershed
    Nick Evershed
    6,429 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    2 Answers

  • Philip Kroupoderov
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Philip Kroupoderov
    Front End Web Development Techdegree Graduate 21,641 Points

    Any particular reason for using anonymous functions??

    Posted December 29, 2017 6:22pm by Philip Kroupoderov
    .a{fill-rule:evenodd;}techdegree seal-36
    Philip Kroupoderov
    Front End Web Development Techdegree Graduate 21,641 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Rwanda Muhammad
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Rwanda Muhammad
    Full Stack JavaScript Techdegree Student 4,116 Points

    The code is not working

    Posted August 23, 2017 2:17am by Rwanda Muhammad
    .a{fill-rule:evenodd;}techdegree
    Rwanda Muhammad
    Full Stack JavaScript Techdegree Student 4,116 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    3 Answers

  • Alex Sorrells
    Alex Sorrells
    530 Points

    Just curious..

    Posted July 30, 2017 3:09am by Alex Sorrells
    Alex Sorrells
    530 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Eric Jusic
    Eric Jusic
    4,350 Points

    Is there any other difference between function and anonymous function?

    Posted July 19, 2017 12:19pm by Eric Jusic
    Eric Jusic
    4,350 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    2 Answers

  • Alex Jederlinic
    PLUS
    Alex Jederlinic
    Courses Plus Student 1,148 Points

    I can't seem to get the windows to pop-up on the preview page of workspaces. Any idea why? I link it, save it and nothin

    Posted June 13, 2017 9:29pm by Alex Jederlinic
    Alex Jederlinic
    Courses Plus Student 1,148 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Vic Mercier
    Vic Mercier
    3,276 Points

    function expression and function

    Posted June 1, 2017 5:43pm by Vic Mercier
    Vic Mercier
    3,276 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    2 Answers

  • David Dong
    David Dong
    5,593 Points

    Statements Inside Functions Repeating

    Posted December 9, 2016 2:56am by David Dong
    David Dong
    5,593 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    5 Answers

  • Victor Horton
    Victor Horton
    20,277 Points

    Why won't this add up my score?

    Posted September 11, 2016 3:34am by Victor Horton
    Victor Horton
    20,277 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Atul R
    Atul R
    3,446 Points

    Why is it not working this way?

    Posted July 4, 2016 10:50am by Atul R
    Atul R
    3,446 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Valeriya Voloshina
    Valeriya Voloshina
    5,943 Points

    My code doesn't work

    Posted November 6, 2015 7:06pm by Valeriya Voloshina
    Valeriya Voloshina
    5,943 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    2 Answers

  • Justin Olson
    Justin Olson
    13,792 Points

    What's the difference?

    Posted August 25, 2015 12:59pm by Justin Olson
    Justin Olson
    13,792 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    3 Answers

  • jaeeunlee
    jaeeunlee
    3,127 Points

    Poor assistant... Why can't you give the assistant something more rewarding to do?

    Posted July 5, 2015 11:03pm by jaeeunlee
    jaeeunlee
    3,127 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    2 Answers

  • Sean Flanagan
    Sean Flanagan
    33,237 Points

    Can't generate numbers

    Posted June 15, 2015 10:03pm by Sean Flanagan
    Sean Flanagan
    33,237 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Joel Glovier
    Joel Glovier
    3,010 Points

    When is it helpful to store a function in a variable instead of simply writing a function declaration?

    Posted April 13, 2015 3:42pm by Joel Glovier
    Joel Glovier
    3,010 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    2 Answers

  • ori
    ori
    2,307 Points

    What does the code inside the Math.random() function actually look like? How can I find that out?

    Posted March 13, 2015 4:10am by ori
    ori
    2,307 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    3 Answers

  • Sally Gradle
    Sally Gradle
    24,694 Points

    Wrong Workspace Connected to Video

    Posted February 18, 2015 2:04am by Sally Gradle
    Sally Gradle
    24,694 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • samantha caplan
    samantha caplan
    2,932 Points

    The workspace for this lesson doesn't launch (it's an old workspace), and you can not choose the correct one manually :(

    Posted February 8, 2015 11:06pm by samantha caplan
    samantha caplan
    2,932 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Leisa Clark
    Leisa Clark
    4,531 Points

    Workspace wrong

    Posted January 20, 2015 2:17am by Leisa Clark
    Leisa Clark
    4,531 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    0 Answers

  • Tony Brackins
    Tony Brackins
    28,766 Points

    document.print not working

    Posted November 29, 2014 4:46pm by Tony Brackins
    Tony Brackins
    28,766 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Eric Orellana
    Eric Orellana
    4,105 Points

    Dave McFarland Fantastic Job!!!

    Posted November 12, 2014 10:04pm by Eric Orellana
    Eric Orellana
    4,105 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    10 Answers

  • Oly Su
    Oly Su
    6,119 Points

    What are the pro's and con's of using Function Statement v.s. Function Expression?

    Posted November 4, 2014 2:09am by Oly Su
    Oly Su
    6,119 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    1 Answer

  • Richard Nash
    Richard Nash
    24,862 Points

    Statements, Declarations and Expressions. Which is which?

    Posted October 31, 2014 7:41pm by Richard Nash
    Richard Nash
    24,862 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Introducing Functions

    4 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