From b9d9ef716e1ed92838c8dbfb5e8fcfe8da45421d Mon Sep 17 00:00:00 2001 From: Arjun Mahishi Date: Sun, 24 Dec 2017 18:57:44 +0530 Subject: [PATCH] Changed 'var' to 'let' --- snippets/randomHexColorCode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/randomHexColorCode.md b/snippets/randomHexColorCode.md index f77524ba7..18691a57a 100644 --- a/snippets/randomHexColorCode.md +++ b/snippets/randomHexColorCode.md @@ -6,7 +6,7 @@ Use `Math.random` to generate a random number and limit that number to fall in b ```js const randomHexColorCode = () => { - var color = '#'; + let color = '#'; while(color.length < 7) color += '0123456789ABCDEF'[Math.floor(Math.random() * 16)]; return color; }