From 726106277814794a38f6ff7596dccbfcfc0f16cf Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Tue, 6 Oct 2020 19:09:30 +0300 Subject: [PATCH] Update xor.md --- snippets/xor.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/snippets/xor.md b/snippets/xor.md index 37590c82d..f05064fed 100644 --- a/snippets/xor.md +++ b/snippets/xor.md @@ -5,11 +5,10 @@ tags: math,logic,beginner Returns `true` if only one of the arguments is `true`, `false` otherwise. -- Logical xor using basic or (`||`), and (`&&`), not (`!`) operators. -- You can use the Bitwise xor (`^`) operator also on the two given values. +- Use the logical or (`||`), and (`&&`) and not (`!`) operators on the two given values to create the logical xor. ```js -const xor = (a, b) => ( ( a || b ) && !( a && b ) ); +const xor = (a, b) => (( a || b ) && !( a && b )); ``` ```js