Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Function.bind" />
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
</body>
</html>
 
var name = 'Window';
var testFunc = function() {
  return "Test Method is called by " + this.name;
};
var starck = {
  name: "Starck",
  callBySelf: window.testFunc,
  callByWindow: window.testFunc.bind(window)
};
Output 300px

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

Dismiss x
public
Bin info
zmaxpro
0viewers