Untitled
public text v1 · immutablefunction print_r(theObj){
var result = '';
if(theObj.constructor == Array || theObj.constructor == Object){
for(var p in theObj){
if(theObj[p].constructor == Array|| theObj[p].constructor == Object){
result = result + "<li>["+p+"] => "+typeof(theObj)+"</li>";
result = result + print_r(theObj[p]);
} else {
result = result + "<li>["+p+"] => "+theObj[p]+"</li>";
}
}
}
return result;
}