title: how to get value from slice A which is not in Slice B?
body: <p>I have two slice <code>A := []string{&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;}</code> and <code>B := []string{&quot;a&quot;,&quot;b&quot;}</code>.</p>
  <p>How to get <code>[&quot;c&quot;,&quot;d&quot;] </code> from slice A?</p>
  <p>I've tried various ways but still not getting the result I want. Thank you</p>
  <pre><code>package main
  
  import (
      &quot;fmt&quot;
  )
  
  
  func main() {
      A := []string{&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;}
      B := []string{&quot;a&quot;,&quot;b&quot;}
      temp := []string{}
      
      for _, a := range A {
          for _, b := range B {
              if a == b {
                  fmt.Printf(&quot;%s == %s\n&quot;, a,b)
                  temp = append(temp, a)
                  break
              }       
          }
          
      }
      
  }
  
  
  </code></pre>