You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
NestJS_Basic/ts_playground/02-functions.ts

12 lines
329 B

function great(name: string): string {
return `안녕하세요, ${name}님!`;
}
const add = (a: number, b: number): number => a + b;
function log(message: string, userId?: number): void {
console.log(`[${userId ?? "Unknown"}] ${message}`);
}
log(add(3, 4).toString());
log(great("타입스크립트"), 135);