Skip to content

Commit

Permalink
hexNumber ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
akbaruddin authored Aug 20, 2021
1 parent 4596f9b commit a3d0795
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions javascript/random/hexNumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const hexNumber = () => `#${Math.random().toString(16).slice(2,9).padEnd(6,'0')}`;

const result = hexNumber(); // #c3fd5db

0 comments on commit a3d0795

Please sign in to comment.