For security, I think you'd better tell the method constructor.
The example arg = arg || "valor padrão";
would generate an instability if the parameter type was boolean or a numeric, "if you entered false or 0, it would assume a default value".
You can either use the typeof or else be declaring in the method constructor, examples below:
In the method constructor (I recommend):
function teste(param = 'valor padrão') {
console.log(param);
}
teste(); // imprime a string valor padrão no console.
teste('oi'); // imprime a string oi no console.
Using typeof:
function teste(param) {
if(typeof param === 'undefined') {
param = 'valor padrão';
}
console.log(param);
}
teste(); // imprime a string valor padrão no console.
teste('oi'); // imprime a string oi no console.