Below code is not executing an it is showing "undefined" in the paragraph. could someone please help?

```html
 <html>
 <head></head>
 <body>
 <button type="button" onclick="getTheNumber();"> Number </button><br>
 <p id="demo">A Paragraph</p>
  <script>
   function getTheNumber(){
    var result ;
    var a ;
    var b ;
    a > b ? result = ["A" , a] : ["B" , b] ;
    return result;
   }
   var res = getTheNumber();
   document.getElementById("demo").innerHTML = res+"";
  </script>
 </body>
    </html>
```