Platform
Resources
Pricing
Sign in
Get started
Ole
Workspace
Fork
Published
Notes on Javascript
By
Ole
Edited
Dec 9, 2020
Insert cell
Insert cell
Insert cell
{
const
mostOuterVariable
=
'galaxy'
const
outerFunction
=
(
)
=>
{
const
outerVariable
=
'milky way'
const
innerFunction
=
(
)
=>
{
const
innerVariable
=
'earth'
return
(
{
innerVariable
,
// earth
outerVariable
,
// milky way
mostOuterVariable
,
// galaxy
}
)
}
return
innerFunction
}
return
outerFunction
(
)
(
)
}
Insert cell
Insert cell
{
const
firstScope
=
(
)
=>
{
const
galaxy
=
'milky way'
const
getGalaxy
=
(
)
=>
galaxy
return
getGalaxy
}
const
secondScope
=
(
)
=>
{
const
galaxy
=
"another galaxy"
const
getGalaxy
=
firstScope
(
)
return
(
getGalaxy
(
)
)
// milky way
}
return
secondScope
(
)
}
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
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