Published
Edited
Jan 31, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
var bob = {name: "Bob", emotion: "happy", species: "Hooman"}
return bob
}
Insert cell
Insert cell
{
var bob = {
name: 'Mr. Bobz',
caffeinated: true
}
return bob.name
}
Insert cell
Insert cell
function eat() { return "WHERE IS MY NOMS?"}
Insert cell
{
var bob = {name: "Bob", emotion: "Hangry", eat: function() {return "Om nom nom"}}
return eat()
}
Insert cell
{
var bob = {name: "Bob", emotion: "Hangry", eat: function() {return "Om nom nom"}}
return bob.eat()
}
Insert cell
Insert cell
{
var bob = {
name: 'bobz',
hangry: false,
eat: function() {
return hangry;
}
}
return bob.eat()
}
Insert cell
Insert cell
{
var bob = {
name: "Bob",
emotion: "Hangry",
eat: function() {
this.emotion = "Full"
}}
bob.eat()
return bob.emotion
}
Insert cell
Insert cell
thisOutOfContext = function() {
// what could `this` be?
return this;
}
Insert cell
Insert cell
{
var doggo = {
bark: function() {
return this.sound
},
sound: 'wooof!'
}
var doggoII = {
bark: doggo.bark,
sound: 'not wooof!'
}
return doggo.bark()
}
Insert cell
Insert cell
Insert cell
Insert cell
function jerry() {
return
//debug starting here
{
name: 'Jerry'
superpower = 'intelligence'
powerScore: 22
getPower: function() {
return powerScore
}
powerUp: function() {
powerScore = powerScore + 20
}
setPower: function(score) {
powerScore = score
}
favoriteFood: function() {
if(powerScore > 50) {
return 'chz'
}
else {
return 'mousetrap chz'
}
}
}
//debug ending here
}
Insert cell
Insert cell
Insert cell
Insert cell
superCat = function() {
var superCat =
{
//write code here
}
return superCat;
}
Insert cell
Insert cell
Insert cell
superDoggo = function ()
{
var superDog =
{
//Write Code here
}
return superDog
}
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more