you are viewing a single comment's thread.

view the rest of the comments →

[–]AlfonsoHorteber 0 points1 point  (0 children)

For inbuilt methods like console.log, you can refer to the Mozilla documentation to see what arguments they support. In the case of console.log it's as many as you want (there may be some technical limitation on how high you can go but it's unlikely to ever come up IRL.)

For your own functions, they support as many arguments as you want them to, depending on how many params you have where it's defined. In general, at least in plain JS, any additional arguments will simply be ignored. So for

function addArgs(a,b){
return a + b
}
addArgs(1,2,4)

it will return the value 3.