title: Vue: Refactoring a computed property
body: <p>I have the following computed property that works as expected.  I want it to return true if any of the 3 data properties are empty strings and want it return true if any of the strings are &quot;n/a&quot;:</p>
  <pre><code>             appNamesInvalid() {
                  if (!this.preferredAppName1 || !this.preferredAppName2 || !this.preferredAppName3) {
                      return true;
                  }
                  if (this.preferredAppName1.toLowerCase().includes('n/a') || this.preferredAppName2.toLowerCase().includes('n/a') || this.preferredAppName3.toLowerCase().includes('n/a')) {
                      return true;
                  }
                  return false;
              },
  </code></pre>
  <p>I had originally tried to do this but this wasn't working as expected and I can't tell why:</p>
  <pre><code>   appNamesInvalid() {
          let appNames = [this.preferredAppName1, this.preferredAppName2, this.preferredAppName3];
          appNames.forEach(appName =&gt; {
              if (appName == &quot;&quot; || appName.toLowerCase().includes(&quot;n/a&quot;)) { 
                 return true;
              }
          }
          return false;
      },
  </code></pre>
  <p>Is there a cleaner way of refactoring the working code in the first block?</p>