// Defining function:
lm( vv: number, kk: string[] )
{
console.log( kk )
}
// Invoking the function
this.lm( 33, ["dd","ff","da"] )
I have thoroughly tested the provided code and it is working flawlessly.
But why do we need ellipses?
Refer to: https://www.typescriptlang.org/docs/handbook/functions.html
function buildName(firstName: string, ...restOfName: string[]) {
return firstName + " " + restOfName.join(" ");
}
The compiler collects all arguments after the specified parameter following the ellipsis (...) into an array, allowing for flexible usage within the function.