Código HTML:
Ver original <script type="text/javascript"> function letter(el){
var data = el.getAttribute("values").split(",");
if(el.getAttribute("status") == "-1"){ el.setAttribute("status", "0"); el.innerHTML = data[0] ; }
if(el.innerHTML == ""){ //if innerHTML is empty renew...
var status = parseInt(el.getAttribute("status"))+1;
if(status >= data.length){ status = 0; }
el.setAttribute("status",status);
el.innerHTML = data[status];
}
else{
var newCont = el.innerHTML.substring(0,el.innerHTML.length-1);
el.innerHTML = newCont;
}
}
setInterval(function(){ letter(document.getElementById("foo")) },200);
<p values="casa,edificio,jardin" status="-1" id="foo"></p>
No lo probé pero se entiende la idea...