I'm trying to get value from js function and pass it to another function or make it global variable. I have variable a3 and I want to get the value from function `add()` but it's not working.

```
<!DOCTYPE html>
<html>
    <head>
        <title>Basic Web Page</title>
        <script>
            console.log('hello world!');
        </script>
    </head>
    <body>
       <form>
    a: <input type="number" name="a" id="a"><br>

    <button onclick="add()">Add</button>
     <p id="greeting">Greetings</p>

  </form>
  <script src="java.js"></script>
    </body>
</html>

```

```
 function add() {
    var a3 = document.getElementById('a').value;
    return a3;    
 }
var a5 = add();
console.log(a5);

```