Learn Javascript, 2017, return II, Codecademy (Return Statements)

Lesson Summary

In this lesson we look further into javascript return statements. A return statement returns a value and can be called from another function. In this lesson we add to our pizza order application by adding a tax function that calculates sales tax. Its important to note the difference between a console.log and a return statement. In javascript a console.log simply outputs computed data on the screen while a return statement is used to usually end a function call and return where it was called from with an optional result.

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required