Platform
Resources
Pricing
Sign in
Get started
Martin Milan
Workspace
Fork
Public
By
Martin Milan
Edited
Apr 5, 2024
Fork of
Emoji in Javascript
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
"☔️"
.
length
Insert cell
"👨👨👧👦"
.
length
Insert cell
Insert cell
"🤑"
.
codePointAt
(
0
)
.
toString
(
16
)
Insert cell
"🤑"
.
charCodeAt
(
0
)
.
toString
(
16
)
Insert cell
Insert cell
"wow! 🤑 i made so much money 💸 using this app?? 📲"
.
match
(
/([\u10000-\u1FFFFF])/g
)
Insert cell
"wow! 🤑 i made so much money 💸 using this app?? 📲"
.
match
(
/([\ud800-\udbff][\udc00-\udfff])/g
)
Insert cell
Insert cell
"☔️"
==
"☔️️"
// one of these has a VAR-16 at the end!
Insert cell
"I'm saving for 👩🏽🔬"
.
match
(
/([\ud800-\udbff][\udc00-\udfff])/g
)
[
0
]
// not what they meant!
Insert cell
html
`
<style>
.bin-display {
display: inline-block;
font-family: "Courier New";
font-weight: bold;
position: relative;
}
.chunk {
margin-left: 0.7em;
}
.chunk .fmt::after {
position: absolute;
top: -1em;
visibility: hidden;
content: attr(label);
width: 10em;
}
.chunk .fmt:hover {
border-bottom: 1px solid slategray;
}
.chunk .fmt:hover::after {
visibility: visible;
}
</style>
`
Insert cell
toCodePoints
=
function
(
str
,
TypedArray
)
{
return
TypedArray
.
from
(
str
.
split
(
''
)
.
map
(
c
=>
c
.
codePointAt
(
0
)
)
)
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
UTF16SurrogatePair
.
html
(
Uint16Array
.
of
(
500
,
499
)
)
Insert cell
Insert cell
Insert cell
html
`☔️ ${
ASCII
.
html
(
Uint8Array
.
of
(
1
,
2
)
)
}`
Insert cell
html
`
<style>
.UTF8 .chunk .f-1 {
border-bottom: 1px solid steelblue;
}
.UTF16Pair .chunk .f-1 {
border-bottom: 1px solid steelblue;
}
</style>
${
UTF8
.
html
(
Uint8Array
.
of
(
237
,
175
,
180
)
)
}
`
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
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
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
Edit
Add comment
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
Edit
Add comment
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
Edit
Add comment
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
toCodePoints
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
BinDisplay
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ASCII
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
UTF8
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
UTF16Normal
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
UTF16SurrogatePair
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
UTF32
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
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