Question: I try to give v-if="seen" for some class but it doesn't work obviously...

My code:

```
<div class="item" v-if="seen">item 1</div>
<div class="item" v-if="seen">item 2</div>
<div class="item" v-if="seen">item 3</div>

var item = new Vue({
   el: 'div.item',
   data: {
       seen: true
   }
});

```

In JavaScript I could do :

```
var item = document.getElementsByClassName('item');
for(var i = 0; i < item.length; i++){
    item[i].style.display = "none";
}

```

How must I do in Vue.js ? Thanks

Answer: 
There is many ways to achieve what you want. Example of one of them:

```
<div is="app">
  <div class="item" v-if="!seen.includes('item1')">
    item 1
  </div>
  <div class="item" v-if="!seen.includes('item2')">
    item 2
  </div>
  <div class="item" v-if="!seen.includes('item3')">
    item 3
  </div>
</div>

var item = new Vue({
  el: '#app',
  data: {
    seen: [
      'item1',
      'item3'
    ]
  }
})

```
```js
var item = new Vue({
   el: 'div.item',
   data: {
       isSeen: true
   },
    computed:{
     seen:()=>this.isSeen;
    }
});
```

or you could use v-show or v-class