how to check the two parameters of a function from array js code example

Example 1: js unspecified parameters

function my_log(...args) {
     // args is an Array
     console.log(args);
     // You can pass this array as parameters to another function
     console.log(...args);
}

Example 2: js use param object or multiple

Like many of the others, I often prefer passing an options object to
a function instead of passing a long list of parameters, but it
really depends on the exact context.

I use code readability as the litmus test.