Platform
Resources
Pricing
Sign in
Get started
Sumant Pattanaik
Workspace
Fork
Published
CAP 4720 2021
By
Sumant Pattanaik
Edited
ISC
Fork of
CAP 4720: Introduction to Observable
Importers
7 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
x
*
2
// x is defined below
Insert cell
x
=
100
// x value is used above
Insert cell
Insert cell
{
let
x
=
0
;
for
(
let
i
=
1
;
i
<=
5
;
++
i
)
{
x
+=
i
;
// adding numbers from 1 - 5
}
return
x
;
}
Insert cell
Insert cell
(
{
top
:
50
,
right
:
50
,
bottom
:
50
,
left
:
50
}
)
//defining object
Insert cell
Insert cell
data
=
[
1
,
2
,
3
,
4
,
5
,
6
]
//defining array
Insert cell
Insert cell
//defining a javascript function
printProgram
=
(
name
)
=>
`Program: ${
name
}`
Insert cell
printProgram
(
"Computer Science"
)
// calling function
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
teapotObjData
=
(
await
soFetch
(
"https://groups.csail.mit.edu/graphics/classes/6.837/F03/models/teapot.obj"
)
)
.
text
(
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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