I'm newbie with javascript and I want to understand why this isn't working:

```
var firstName = $("#firstName").val();

$("#account").on('submit', function() {
     console.log(firstName); // Empty value
});

```

jsfiddle: [FIDDLE](https://jsfiddle.net/76gezoos/2/)