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>
 
var Animal = function(name) {
   this.name = name;
};
Animal.prototype.getName = function() {
  return this.name;
};
var mouse = new Animal('mouse');
console.log(mouse.getName());
var MutatedAnimal = Animal.bind({}); // Radiation :)
console.log(MutatedAnimal.hasOwnProperty('prototype'));
var mutatedMouse = new MutatedAnimal('mouse with two heads');
console.log(mutatedMouse.getName());
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers