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="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
function create(subscriber) {
    var observable = {
        subscribe: function(observer) {
            subscriber(observer)
        }       
    };
    return observable;
}
var observable = create(function(observer) {
  observer.next(1);
  observer.next(2);
  observer.next(3);
})
var observer = {
  next: function(value) {
    console.log(value)
  }
}
observable.subscribe(observer)
Output 300px

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

Dismiss x
public
Bin info
s6323859pro
0viewers