title: Get the last item of an array VueJS
body: <p>I am working on a small VueJS webapp. I would like to output data from my array to the view but it has to be the last item of an array and of that last item the second item which is a and in my example equel to 39. I don't know how I can recieve that one. </p>
  
  <p>HTML</p>
  
  <pre><code>&lt;p&gt;The last number in the array (a) is {{userLastCount}} &lt;/p&gt;
  </code></pre>
  
  <p>Javascript/Vue</p>
  
  <pre><code>data () {
      return {
  
          event: 'Custom event',
          userLastCount: 0,
  
  
          lineData: [
              { time: '2017-05-01 15:00', a: 0 },
              { time: '2017-05-01 16:00', a: 12 },
              { time: '2017-05-01 17:00', a: 23 },
              { time: '2017-05-01 18:00', a: 28 },
              { time: '2017-05-01 19:00', a: 39 },
          ]
  
      }
  },
  
  components: {
      DonutChart, BarChart, LineChart, AreaChart
  },
  
  created() {
      this.userLastCount = //equal to 39
  }
  </code></pre>
  
  <p>I would like to output the last value of 'a' of the lineData object and assign it to a data string which I can output to the view. So, now the last 'a' = 39. But if I add another row in my object It has to be that one that is assigning to <code>this.userLastCount</code></p>