Arrow Function Examples

Add a short description of your function, what it does and where you got it. You can pull it from some other project you have, or you can create a function from scratch that does something simple and straight forward. Don't just use one of Bill and Glenda's examples though.

Named Function

This code multiplies two numbers and prints the result in the console. I figured this function out by myself because I wanted to create a simple function but also have two parameters.
            function multiply (num1, num2) {
                num1 = '4';
                num2 = '5';
                return (num1 * num2);
            }

            console.log(multiply());
        

Function Expression

            const multiplyMe = function multiply (num1, num2) {
                num1 = '4';
                num2 = '5';
                return (num1 * num2);
            }
    
            console.log(multiplyMe());
        

Arrow Function

            const multiplyMe = (num1, num2) => num1 * num2;

            console.log (multiplyMe('4', '5'));