JavaScript quick tips 📜 unlimited number of arguments in a function | JavaScript functions

preview_player
Показать описание
#javascirpt #javascriptfunctions #unlimitedarguments
How to use unlimited arguments in a JavaScript function?
How do you pass infinite arguments in JavaScript function?
How do you pass n number of arguments to a function?
Can a function take unlimited arguments?

JavaScript Shorts
Рекомендации по теме
Комментарии
Автор

There's also rest parameters which is more explicit. It looks like the spread syntax (which was also used in this Short)

function show(...args) {
// do stuff with `args`
// it's a regular array
}

re.liable
Автор

const show = (...items) => console.log(items.length)

that's it

shadowplay
Автор

bro, this video on youtube (desktop web version) half of the code is covered by the description. Keep that in mind for the future.

juliandurand__