What is the difference between passing individual parameters and passing an array as raw in TWIG for JavaScript function parameters?

When passing individual parameters to a JavaScript function in TWIG, each parameter needs to be passed separately, which can become cumbersome if there are many parameters. On the other hand, passing an array as raw allows you to pass multiple parameters in a single array, making the code cleaner and more efficient.

// Passing individual parameters
{{ js_function(param1, param2, param3) }}

// Passing an array as raw
{{ js_function({ 'param1': param1, 'param2': param2, 'param3': param3 }) }}