Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
const myDog = {
  name: "Fido",
  age: 4,
  likesCats: true,
  speak: function() {
    return 'Woof woof'
  }
}
// store myDog's name in a variable called dogName
// we are using dot notation to access the name of the myDog object
const dogName = myDog.name
console.log(dogName)
// call the speak method of myDog 
// we are using dot notation to access the 
// .speak() function of the myDog object
console.log(myDog.speak())
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x