When using methods / functions in JavaScript, as in other programming languages we can pass parameters
EXAMPLE
function saludar(name){
console.log("Hola: "+name)
}
Here we send the function call
saludar("SO en español")
The result will be
"Hola SO en español"
EXAMPLE 2
function hi(name, email, ){
console.log(name+email)
}
At the moment of calling the function, as in the following line, it would give error then with the comma that is of more mark error to be waiting for an extra marámetro
hi("alfa", "[email protected]")
EXCEPTION TO THE RULE
Although the error occurs for the functions, for the case of the arrangements the use of extra commas has been allowed
EXAMPLE
let datos = [1, 2, 3, 4, 54,];
console.log(datos);
How does this treat the trailing commas ?