Platform
Resources
Pricing
Sign in
Get started
Igor Akulov
aegor
Workspace
Fork
Published
education
By
Igor Akulov
Edited
Mar 27, 2019
Fork of
Mutable Values
Insert cell
Insert cell
mutable
x
=
0
// Define a mutable and set its initial value.
Insert cell
Insert cell
md
`The current value of *x* is: ${
x
}`
// Reference a mutable value
Insert cell
Insert cell
{
const
button
=
html
`<button>Increment <i>x</i></button>`
;
button
.
onclick
=
(
)
=>
++
mutable
x
;
return
button
;
}
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
Compare fork
Fork
View
Export
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
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