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 superHero = {
  'secret identity': 'Peter Parker',
  name: 'Spiderman',
  powers: ['super strength', 'hyper awareness', 'agility', 'genius intellect'],
  age: 17,
  sayTagline: function() { // <- method
    console.log("Hey everyone it's your friendly neighborhood Spiderman")
  }
}
// call the the method, just as you would call any function
superHero.sayTagline()
Output

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

Dismiss x