1--- 2title: "symdiff" 3description: "`collections.SymDiff` (alias `symdiff`) returns the symmetric difference of two collections." 4date: 2018-11-07 5categories: [functions] 6menu: 7 docs: 8 parent: "functions" 9keywords: [collections,intersect,union, complement] 10signature: ["COLLECTION | symdiff COLLECTION" ] 11hugoversion: "0.51" 12aliases: [] 13--- 14 15Example: 16 17```go-html-template 18{{ slice 1 2 3 | symdiff (slice 3 4) }} 19``` 20 21The above will print `[1 2 4]`. 22 23Also see https://en.wikipedia.org/wiki/Symmetric_difference 24 25 26 27 28 29