title: Vue.js - How to pass parameters to a JavaScript filter function within a computed property?
body: <p>I want to pass a variable as a parameter to a computed property.</p>
  
  <pre><code>computed: {
      dishes() {
        let param = this.cuisine;
  
        let dishes = this.restaurant.restaurant_items.filter(element =&gt; {
          element.param
        });
  
        return dishes;
      }
  },
  data(){
      return{
          cuisine:""
      }
  }
  </code></pre>
  
  <p>Here as the param I pass a value which is an element of <code>restaurant_items</code> array's objects.</p>
  
  <p>eg(:- is_thai)</p>
  
  <p>But this doesn't output me anything. What's wrong with my code?</p>