It's actually simple.
function yourFunction() {
return chrome.app.getDetails().version;
}
where you can name yourFunction
whatever you like.
Then to call it, just insert yourfunction()
wherever you want to call the version number.
For example, if your version number is 9.07, then yourfunction()
actually equals the numeric value of 9.07