Platform
Resources
Pricing
Sign in
Get started
Andrew Wooldridge
📜JavaScript developer. 🐲RPG fan. 📚Storyteller and 🕹game developer. 👨Father and Husband.
Workspace
Fork
Published
2 collections
By
Andrew Wooldridge
Edited
Nov 7, 2021
Insert cell
Insert cell
Insert cell
class
Rectangle
{
constructor
(
height
,
width
)
{
this
.
height
=
height
;
this
.
width
=
width
;
}
// Getter
get
area
(
)
{
return
this
.
calcArea
(
)
;
}
// Method
calcArea
(
)
{
return
this
.
height
*
this
.
width
;
}
}
Insert cell
square
=
new
Rectangle
(
10
,
10
)
;
Insert cell
square
.
calcArea
(
)
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
Listed in...
Tips and Utilities
Andrew Wooldridge
JavaScript Tips
Andrew Wooldridge
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Rectangle
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
square
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML