Platform
Resources
Pricing
Sign in
Get started
Pranav Rajan
Workspace
Fork
Published
By
Pranav Rajan
Edited
Jun 3, 2020
Insert cell
md
`# Observable is not JavaScript`
Insert cell
This
is
English
,
not
Javascript
Insert cell
{
throw
new
Error
(
"get shrekt"
)
}
Insert cell
{
var
local
=
"I am a local variable."
;
}
Insert cell
local
Insert cell
a
+
2
Insert cell
a
=
1
Insert cell
c1
=
c2
-
1
Insert cell
c2
=
c1
+
1
Insert cell
b
=
Math
.
random
(
)
Insert cell
b
*
b
Insert cell
// handling promises
hello
=
new
Promise
(
resolve
=>
{
setTimeout
(
(
)
=>
{
resolve
(
"hello there"
)
;
}
,
30000
)
;
}
)
Insert cell
hello
.
split
(
/\s+/g
)
// i
Insert cell
c
=
{
yield
1
;
yield
2
;
yield
3
;
}
Insert cell
c
Insert cell
{
let
sum
=
0
;
for
(
let
i
=
0
;
i
<
10
;
++
i
)
{
sum
+=
i
;
}
return
sum
;
}
Insert cell
object
=
(
{
foo
:
"bar"
}
)
Insert cell
viewof
text
=
html
`<input value="edit me">`
Insert cell
mutable
thing
=
0
Insert cell
++
mutable
thing
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
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
a
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
c1
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
c2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
b
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
hello
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
c
Add comment
Copy import
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
object
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
text
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
thing
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML