Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Introducing Functions in JavaScript 4:08
- Introducing Functions Review 5 questions
- Create and Call a Function 4:57
- Creating a Function 3 objectives
- Return a Value from a Function 4:32
- Return a Value from a Function 3 objectives
- Using Multiple return Statements 6:58
- Function Return Values Review 5 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
A function can have more than one return statement, but only ever run one based on a condition.
Resources
Code Snippet
function noAlert() {
return 5;
alert("This won't appear");
}
noAlert();
alert("This will appear");
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Magan Tyson
1,286 Points1 Answer
-
Andrew Terrett
2,080 Points2 Answers
-
Megan Chen
7,406 Points1 Answer
-
David Douglas
3,719 Points1 Answer
-
Adrian Rojas-Baez
3,672 PointsWhy does the statement if (fieldTest) { } return true? Does if(x) {} always return a true statement?
1 Answer
-
Hina K.
4,807 Points2 Answers
-
Geovani Mejia
Front End Web Development Techdegree Student 7,940 Points1 Answer
-
jcruzaxaeon
Full Stack JavaScript Techdegree Student 16,520 Points2 Answers
-
PLUS
Jason Papenmeier
Courses Plus Student 780 Points1 Answer
-
ja5on
10,338 Points1 Answer
-
Esther AlQaisi
2,311 Points2 Answers
-
Kendall McCall
8,177 Points2 Answers
-
terry okey
3,187 Points1 Answer
-
Kirt Perez
7,374 Points1 Answer
-
ja5on
10,338 Points1 Answer
-
Ryan Soeder
11,056 Points2 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up