From 023bac915d777da3f8322daf9c9dc55ad958ac08 Mon Sep 17 00:00:00 2001 From: Oscar Shrimpton Date: Mon, 29 Jan 2018 19:39:33 +0000 Subject: [PATCH] Removed unnecessary OR in randomHexColorCode() --- snippets/randomHexColorCode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/randomHexColorCode.md b/snippets/randomHexColorCode.md index 61231383c..84b4dfb64 100644 --- a/snippets/randomHexColorCode.md +++ b/snippets/randomHexColorCode.md @@ -6,7 +6,7 @@ Use `Math.random` to generate a random 24-bit(6x4bits) hexadecimal number. Use b ```js const randomHexColorCode = () => { - let n = (((Math.random() * 0xfffff) | 0) << 6).toString(16); + let n = (((Math.random() * 0xfffff)) << 6).toString(16); return '#' + n.slice(0, 6); }; ```