Menu
f=function(x,y){if(x<y){return x*3;}else{return y
document.write(“<p>” + f.toString() + “</p>”)
I guess my question is naive. But I ask anyway, as I don’t find a good webpage for answering it.
Suppose I run the above code in the browser, I will get the following in the html. Does anybody know how to print an option/function in html? The result must be human readable (meaning with proper indentation).
“function (x,y){if(x”
Thanks!