Welcome to the 28th Easy JavaScript tutorial, part of EasyProgramming.net. I apologize for the static in this video! I've gotten a new mic since this was recorded.
We continue to look at custom functions by practicing functions which return something.
When functions return something, they can be used as values for variables. And this tutorial shows you what you can do with those returned values!
function nameOfFunction(parameter1, parameter2...){ //declare local variables //do something with parameter 1 //do something with parameter 2 //do other things //return value (optional) }
nameOfFunction(argument1, argument2...);
To fork the fiddle and follow along: https://jsfiddle.net/easyjs/kk7dtcek/
Remember to checkout the Resources section below for associated downloadable content, JSFiddle links, and other resources. Watch the video and follow along!