Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<body>
<script>
/****************1*****************/
function fn() {}
fn.prototype.say = function(t) {
   alert(t);
};
var b = new fn();
  
b.say('hello b');
/****************2*****************/
var a = {
say:  function(t){
    alert(t);
  }
};
a.say('hello a');
</script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers