There is no absolute best way of doing it. But, there are few ways that can simplify and bring in more meaning to the code written with default parameters.
You can define all the default parameter in the starting of the arguments and for rest of the parameters which doesn't have a default value, make use of the rest operator.
Eg -
function doSomething(a='apple',b='banana',...args){
console.log(a);
console.log(b);
console.log(args);
}
let x,y;
doSomething(x,y,"hello","hey","hi");
output -

Go through the following link to get more understanding of the rest operator.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters
Though a little unrelated. By default javascript, parameters are undefined if they are not passed any value or reference. You can check that the parameters are not undefined inside your code block.