Platform
Resources
Pricing
Sign in
Contact us
Alan Kang
Workspace
Fork
Published
By
Alan Kang
Edited
May 10, 2020
1 fork
Importers
1 star
Insert cell
Insert cell
test
(
'Addition'
,
(
)
=>
{
expect
(
1
+
2
)
.
toBe
(
3
)
}
)
Insert cell
test
(
'Array.push() and pop()'
,
(
)
=>
{
const
array
=
[
1
,
2
,
3
]
// push
array
.
push
(
4
)
expect
(
array
)
.
toStrictEqual
(
[
1
,
2
,
3
,
4
]
)
// pop
expect
(
array
.
pop
(
)
)
.
toBe
(
4
)
expect
(
array
)
.
toStrictEqual
(
[
1
,
2
,
3
]
)
}
)
Insert cell
Insert cell
function
fixture
(
)
{
return
[
1
,
2
,
3
]
}
Insert cell
test
(
'Addition with pre-defined data'
,
(
)
=>
{
const
data
=
fixture
(
)
expect
(
data
.
reduce
(
(
a
,
b
)
=>
a
+
b
)
)
.
toBe
(
1
+
2
+
3
)
}
)
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
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
fixture
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
test
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
expect
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML