<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=, initial-scale=1.0">
  <link rel = "stylesheet" href = "style.css">
  <title>구구단</title>
</head>
<body>
  <h2>숫자 배열 조작과 구구단 출력</h2>
  <div id = "app">
    <ul>
      <li v-for = "(item, index) in myArray">{{ item }}</li>
    </ul>
    <button v-on:click = "addFirst(0)">추가</button>
    <button v-on:click = "sortData(myArray)">소트</button>
    <button v-on:click = "showGuGu">구구단 보이기</button>
  </div>
  <script>
    new Vue({
      el:'#app',
      data : {
        myArray : [2,3,4,5,6,7,8,9]
      },
      methods:{
        deleteObj: function(index) {
            this.myArray.splice(index, 0);
          },
        itemUp: function(){
            this.item++;
          },
        addFirst : function(index){
          this.myArray.splice(index,0,'1')
        },
        sortData: function(listdata){
          listdata.sort(function(a,b){
            return(a < b ? -1 : 1)
          })
        },
        modifyNumber: function(){
          <button v-on:click = "itemUp">변경</button>
        },
        deleteNumber: function() {
          <button v-on:click = "deleteObj(0)">삭제</button>
        },
        showGuGu: function(){
          <li v-for="n in 9">item x {{ n }} = {{ item * n }}</li>
        }
      }
    })
  </script>
</body>
</html>


교수가 준 과제 내가 짜온게 이거거든? 근데 지금 배열 하나도 못읽고 있는데, 이유를 모르겠어..