function lol() {
var b = new Cell();
document.write(b.clan);
}
function Cell(){
this.clan = function() {
this.b = document.getElementById("clan").value;
return this.b();
};
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<input type="text" id="clan"/>
<input type="button" onclick="lol()"/>
</body>
</html>
¿Por qué, al apretar el botón, esta función me muestra el cuerpo del método (su código) y no su contenido, no la ejecuta? ¿y cómo lo soluciono?