Published
Edited
Aug 13, 2020
1 star
Insert cell
md`# Object`
Insert cell
man = {
var man = {
name: "alice",
age: 99,
height: 199
}
return man
}
Insert cell
tree = {
var tree = new Object()
tree.name = "Christmas Tree"
tree.height = 200
tree.age = 5
return tree
}
Insert cell
cat = {
var cat = {
weight: "4 公斤"
}
cat.age = 4
cat.color = "black"
cat.height = "1dm"
cat.name = "小米"
return cat
}
Insert cell
apple = {
var apple = {}
apple.color = "red"
apple.weight = "1 kg"
apple.height = "1.5 dm"
return apple
}
Insert cell
{
var objects = {
cat: cat,
tree: tree,
apple: apple,
man: man
}
return objects.tree
}
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.
Learn more