Changed 'var' to 'let'

This commit is contained in:
Arjun Mahishi
2017-12-24 18:57:44 +05:30
parent 709756efe4
commit b9d9ef716e

View File

@ -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;
}