728x90
/**
* @param {...(null|boolean|number|string|Array|Object)} args
* @return {number}
*/
var argumentsLength = function(...args) {
return args.length
};
/**
* argumentsLength(1, 2, 3); // 3
*/
https://leetcode.com/problems/return-length-of-arguments-passed/
728x90
'IT > 코딩테스트' 카테고리의 다른 글
[Leetcode] 2236. Root Equals Sum of Children (0) | 2024.02.05 |
---|---|
[Leetcode] 1002. Find Common Characters (0) | 2024.02.04 |
[Leetcode] 9. Palindrome Number (0) | 2024.02.02 |
[Leetcode] 2859. Sum of Values at Indices With K Set Bits (0) | 2023.09.17 |
[Leetcode] 1141. User Activity for the Past 30 Days I (0) | 2023.09.06 |