I would appreciate all the help. I would like to write a function which would take couple of parms such name and address. Can I use ternary operators instead of IF STATEMENT to validate the function arguments:

PHP Code:
document.write("Name: <br>");
document.write("Name: " name "<br>");

So pretty much I would like to write:

var name = (name == ' ') ? 'name' : ' ';

I am not sure if this is the write syntax. Appreciate all the help.

Thanks a lot.