{
"data": {
"question": {
"questionId": "2820",
"questionFrontendId": "2703",
"boundTopicId": null,
"title": "Return Length of Arguments Passed",
"titleSlug": "return-length-of-arguments-passed",
"content": "Write a function argumentsLength
that returns the count of arguments passed to it.\n
\n
Example 1:
\n\n\nInput: args = [5]\nOutput: 1\nExplanation:\nargumentsLength(5); // 1\n\nOne value was passed to the function so it should return 1.\n\n\n
Example 2:
\n\n\nInput: args = [{}, null, "3"]\nOutput: 3\nExplanation: \nargumentsLength({}, null, "3"); // 3\n\nThree values were passed to the function so it should return 3.\n\n\n
\n
Constraints:
\n\nargs
is a valid JSON array0 <= args.length <= 100
Node.js 16.13.2
.
Your code is run with --harmony
flag, enabling new ES6 features.
lodash.js library is included by default.
\\r\\n\\r\\nFor Priority Queue / Queue data structures, you may use 5.3.0 version of datastructures-js/priority-queue and 4.2.1 version of datastructures-js/queue.
\"], \"typescript\": [\"Typescript\", \"TypeScript 5.1.6, Node.js 16.13.2
.
Your code is run with --harmony
flag, enabling new ES2022 features.
lodash.js library is included by default.
\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }