MCPcopy 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/// 剩余参数
34function add7(x: number, ...rest: number[]){
35 return x + rest.reduce((pre,cur) => pre + cur)
36}
37console.log(add7(1,2,3,4,5))
38
39/// 函数重载

Callers 1

function.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected