Platform
Resources
Pricing
Sign in
Get started
Maya Gans
Workspace
Fork
Published
Advent of Code 2021
By
Maya Gans
Edited
Dec 8, 2021
1 star
Advent of Code 2021
1: Slider
2: Coordinates
3: Binaries
7: Triangular Numbers
8: Numbers
Insert cell
Insert cell
numbers
=
[
]
.
concat
.
apply
(
[
]
,
output
.
split
(
"\n"
)
.
map
(
x
=>
x
.
substring
(
x
.
indexOf
(
"|"
)
+
1
)
.
trim
(
)
.
split
(
" "
)
)
)
.
map
(
x
=>
x
.
length
)
.
filter
(
x
=>
[
2
,
3
,
4
,
7
]
.
includes
(
x
)
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
numbers
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
vector
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
visual
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
output
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML