Well done, on completing this.
There are many ways this could be done. To get a better idea of improvements, I suggest you look at the guide post: freeCodeCamp Challenge Guide: Find the Symmetric Difference - Guide - The freeCodeCamp Forum
Hope this helps