How do you access global variables updated in functions in JavaScipt? : I have two functions that update previously defined global variables. When I want to add the updated versions of the variables and print them to the console, JavaScript adds the original values that the variables were defined as. How do I add the updated values? I have included the code below.

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

    var number1 = 1;
    var number2 = 2;

    function function1() {
       number1 = 3; 
    }

    function function2() {
      number2 = 4;
    }

    console.log(number1 + number 2);

<!-- end snippet -->

