Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SincereCSL/Playgrounds
/ add7
Function
add7
TypeScript/StudyTypeScript/src/function.ts:34–36 ·
view source on GitHub ↗
(x: number, ...rest: number[])
Source
from the content-addressed store, hash-verified
32
33
/// 剩余参数
34
function
add7(x: number, ...rest: number[]){
35
return
x + rest.reduce((pre,cur) => pre + cur)
36
}
37
console.log(add7(1,2,3,4,5))
38
39
/// 函数重载
Callers
1
function.ts
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected