Platform
Resources
Pricing
Sign in
Get started
Observable
The end-to-end solution for building and hosting better data apps, dashboards, and reports.
Workspace
Fork
Public
Learning Observable
By
3 authors
Edited
Mar 17, 2023
5 forks
6 stars
3
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
x
=
Math
.
random
(
)
Insert cell
Math
.
sqrt
(
x
)
Insert cell
Insert cell
d3
.
group
(
olympians
,
d
=>
d
.
sport
)
Insert cell
Insert cell
Insert cell
Insert cell
viewof
maxVal
=
Inputs
.
range
(
[
0
,
100
]
,
{
label
:
"Sum up to"
,
step
:
1
}
)
Insert cell
total
=
{
let
sum
=
0
;
for
(
let
i
=
1
;
i
<=
maxVal
;
i
+=
1
)
{
sum
+=
i
;
}
return
sum
;
}
Insert cell
Insert cell
function
sumNums
(
max
)
{
let
sum
=
0
;
for
(
let
i
=
1
;
i
<=
max
;
i
+=
1
)
{
sum
+=
i
;
}
return
sum
;
}
Insert cell
Insert cell
total2
=
sumNums
(
maxVal
)
Insert cell
Insert cell
Insert cell
obj
=
(
{
a
:
1
,
b
:
2
}
)
Insert cell
Insert cell
function
objReturn
(
)
{
return
{
a
:
1
,
b
:
2
}
}
Insert cell
obj2
=
objReturn
(
)
Insert cell
Insert cell
Insert cell
lion
=
FileAttachment
(
"pexels-charl-durand-6436445-cropped.jpeg"
)
.
image
(
{
width
:
500
}
)
Insert cell
Insert cell
2
Insert cell
${
await
FileAttachment
(
"pexels-charl-durand-6436445-cropped.jpeg"
)
.
image
(
{
width
:
250
}
)
}
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
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
x
Add comment
Copy import
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
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
maxVal
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
total
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
sumNums
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
total2
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
obj
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
objReturn
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
obj2
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
lion
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
Show 2 comments
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
newUsersCourseSmJsInObservable
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML