Processing Function Output
4. Summary and References
Summary:
The outputs for functions can be processed in different ways. They are listed as follows:
- Function outputs can be displayed in the webpage using I/O statements within the function block.
- The return statement is used to pass the value of the function output to a variable outside of the function block. Once the value is stored in a variable outside the function block, it can be used for operations for lines of code outside of the function block.
References
Functions. (2020, December 15). MDN Web Docs. https://developer.mozilla.org/en-US/docs/Web/JavaScript/ Guide/Functions
JavaScript Functions. (n.d.). W3Schools Online Web Tutorials. https://www.w3schools.com/js/ js_functions.asp
JavaScript return Statement. (n.d.). W3Schools Online Web Tutorials. https://www.w3schools.com/jsref/ jsref_return.asp
What is a return statement? (2018, November 13). Computer Hope’s Free Computer Help. https:// www.computerhope.com/jargon/r/returnst.htm