Can we set optional parameter for a function?

lets say i define a function…

function myFunc(para1, para2, para3){
blah… blah…
}

but i want para3 to be an optional parameter… can i do it…?

example…i will either use myFunc(var1, var2); or myFunc(var1, var2, var3); when calling myFunc function…