Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html><html lang="en"><body>
<script>
var foo = { // window is implied here, window.foo
    fooMethod: function() {
        alert('fooo' + 'bar'); // window is implied here, window.alert
        window.alert('foo' + 'bar'); 
      window.alert('foo' + 'bar'); 
      // window is explicitly used, with the same effect
    }
}
foo.fooMethod(); // window is implied here, window.foo.fooMethod()
</script></body></html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers