Hi,
Is there a way to provide a default for a function parameter.
i tried
function func (type, message, obj = "message")
but it doesn't seem to work.
It seems a bit ugly to make an if/else statement right at the begining
of a function, just to imitate this behavior.
Is there a way to provide a default for a function parameter.
i tried
function func (type, message, obj = "message")
but it doesn't seem to work.
It seems a bit ugly to make an if/else statement right at the begining
of a function, just to imitate this behavior.
Comment