Possible Duplicate:
Is there a better way to do optional function parameters in Javascript?
Default value for function parameter?
I can I do this on javascript (jQuery) function
function somename(variableone = "content"){
return variableone;
}
Now to access that function:
alert(somename()) //this should alert "content"
alert(somename("hello world"); //this should return "hello world"
but I get this error Uncaught SyntaxError: Unexpected token =
If this is not possible, is there a way to achieve the same result? OR most importantly is this a good (correct) practice.