get unique values from both arrays javascript code example Example: array with unique values javascript let uniqueItems = [...new Set(items)]