Public
Edited
Dec 31, 2022
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
input = "8".repeat(70)
Insert cell
function editor(input) {
let str = input;
while (/2222|8888/g.test(str)) {
if (/2222/g.test(str)) {
str = str.replace(/2222/, "88");
} else {
str = str.replace(/8888/, "22");
}
}
return str;
}
Insert cell
editor(input)
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.
Learn more