polin11,
<html>
<head>
<script type="text/javascript">
function animal()
{
this.name="WOLF";
}
animal.prototype.repeat=function(){
var self = this;
document.getElementById('target').innerHTML+=this.name+'<br/>';
setTimeout(self.repeat.bind(self), 1000);
}
document.addEventListener('DOMContentLoaded', function () {
var ex=new animal();
ex.repeat();
});
</script>
</head>
<body>
<div id="target"></div>
</body>
</html>