Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Thanks for your reply. But I need to be able to pass a number like 10 to the overloadedFunc() function, and not like in your example in an array. Is it possible to implement like this? Commented Oct 24, 2022 at 15:42
  • @trainee ok, I updated the function to utilize a ternary to evaluate arg1 as an Array. Commented Oct 24, 2022 at 15:49