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 getThis() {  
  'use strict';
  return this;
}
var one = getThis.bind(1);  
// Bound function invocation
console.log(one()); // => 1  
// Use bound function with .apply() and .call()
console.log(one.call(2));  // => 1  
console.log(one.apply(2)); // => 1  
// Bind again
console.log(one.bind(2)()); // => 1  
// Call the bound function as a constructor
console.log(new one());     // => Object  
Output 300px

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

Dismiss x
public
Bin info
panzerdppro
0viewers