Ask coding questions

← Back to all posts
Adding arrays and Object literals inside a function parameter
Coding1000 (9)

So some people add arrays or objects inside their parameters such as this, FunctionName(["Hello", "world"]) or FnValue(123, { "Hello", "World", True}) how do you create those type of parameters in the beginning of the function and how do you use those in other JavaScript methods

Coding1000 (9)

No but I want to learn how to do it this way

ash15khng (682)

I think you can create the parameters as normal?