ANONYMOUS FUNCTIONS

Outcome 1 ....


    const buttonOne = document.getElementById('btnAction1');

    // ANONYMOUS FUNCTION NO NAME- Is inside of the event listener.

    buttonOne.addEventListener('click', function(){
        console.log("Button Works");
        document.getElementById('outcomeOne').innerHTML = " IT WORKS!!!";
    
    });

    // ANONYMOUS FUNCTION WITH NAME- Is inside of the event listener.

    buttonOne.addEventListener('click', function someFunctionName(){
        console.log("Button Works");
        document.getElementById('outcomeOne').innerHTML = " IT WORKS!!!";
    
    });

            

ARROW FUNCTIONS

EASIER WAY TO WRITE THE FUNCTION (=>)


    //ARROW FUNCTION - Can Be written instead of the "function" Keyword.

    const someValue = (inputOne, inputTwo) => inputOne + inputTwo;

    // When there is NO ARGUMENTS we need empty parenthesis
    const somevalue = () => inputOne + inputTwo;

    //When there is ONE argument
    const someValue = argument => inputOne + inputTwo;


       
js-arrowFunctionRules