title: How to assign the value inside the if condition in vue?
body: <p>I don't know if <strong>vue</strong> recognize the syntax below:</p>
  
  <pre><code>if(var error = errors.description){
      location.href = "/redirect?topic="+error;
  }
  </code></pre>
  
  <p>The code above returns a compilation error:</p>
  
  <blockquote>
    <p>ERROR in ./resources/js/forms/Signup.vue?vue&amp;type=script&amp;lang=js&amp; (./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/forms/Signup.vue?vue&amp;type=script&amp;lang=js&amp;)</p>
  </blockquote>
  
  <p>Someone knows how to assign a variable inside the if else condition? </p>