Platform
Resources
Pricing
Sign in
Get started
sungryeol park(max)
frontend + d3
Workspace
Fork
Published
util
By
sungryeol park(max)
Edited
Mar 20, 2020
Importers
Insert cell
md
`# random-id`
Insert cell
allUpperCaseLetters
=
Array
.
from
(
{
length
:
26
}
)
.
map
(
(
_
,
i
)
=>
String
.
fromCharCode
(
i
+
65
)
)
Insert cell
allLowerCaseLetters
=
Array
.
from
(
{
length
:
26
}
)
.
map
(
(
_
,
i
)
=>
String
.
fromCharCode
(
i
+
97
)
)
Insert cell
allCaseLetters
=
[
...
allUpperCaseLetters
,
...
allLowerCaseLetters
]
Insert cell
getRandomLetter
=
(
)
=>
{
const
index
=
Math
.
floor
(
Math
.
random
(
)
*
allCaseLetters
.
length
)
;
return
allCaseLetters
[
index
]
;
}
Insert cell
getRandomLetter
(
)
Insert cell
getRandomChunk
(
)
Insert cell
getRandomChunk
=
(
)
=>
{
const
time
=
Math
.
round
(
new
Date
(
)
.
getTime
(
)
*
Math
.
random
(
)
)
;
return
time
.
toString
(
32
)
;
}
Insert cell
getRandomId
=
(
)
=>
getRandomLetter
(
)
+
getRandomChunk
(
)
+
getRandomChunk
(
)
+
getRandomChunk
(
)
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
allUpperCaseLetters
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
allLowerCaseLetters
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
allCaseLetters
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
getRandomLetter
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
getRandomChunk
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
getRandomId
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML