Published
Edited
Jan 19, 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

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