Skip to content

2703. Return Length of Arguments Passed

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
type JSONValue =
  | null
  | boolean
  | number
  | string
  | JSONValue[]
  | { [key: string]: JSONValue };

function argumentsLength(...args: JSONValue[]): number {
  return args.length;
}