how to give a default value to a function in typescript code example
Example: typescript default parameter
// Default Parameters
sayHello(hello: string = 'hello') {
console.log(hello);
}
sayHello(); // Prints 'hello'
sayHello('world'); // Prints 'world'