
Functions and arguments
This piece of code shows you how to group together JavaScript statements into a function to make a specific action happen. You can then call this function later in your code as many times as you need. You can use a return statement within a function to make it give back a piece of information.
See the Pen M2 CS Functions and arguments by Walker Books UK (@walkerbooks) on CodePen.