0

What is argument objects in JavaScript & how to get the type of arguments passed to a function ?

Explain me with example 🧑🏻‍💻

11th Nov 2022, 9:10 PM
Himanshu Khadka
Himanshu Khadka - avatar
2 Antworten
+ 2
I'm no JS master, but hopefully I can explain the most basic parts of it. Arguments object is effectively everything that gets passed into a function, and in JS, you can get types of arguments by iterating over them and running typeof on each iteration. For a more advanced explanation check out: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments https://www.w3schools.com/js/js_function_parameters.asp
11th Nov 2022, 9:20 PM
Kamal Tufekcic
11th Nov 2022, 9:24 PM
Himanshu Khadka
Himanshu Khadka - avatar