Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="minimum-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no" />
    <title>Learning React Chapter 2 Samples</title>
  </head>
  <body>
    <h1>Open the Console</h1>
  </body>
</html>
 
// Object literals... the old way
var name = "Léo Taillefer"
var sound = "Kahh"
var skier = {
  name: name,
  sound: sound,
  powderYell: function() {
    var yell = this.sound.toUpperCase()
    console.log(`${yell} ${yell} ${yell}!!!`)
  },
  speed: function(mph) {
    this.speed = mph
    console.log('speed:', mph)
  }
}
skier.powderYell()
skier.speed("hair on fire")
console.log(JSON.stringify(skier))
Output

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

Dismiss x
public
Bin info
moonhighwaypro
0viewers