面试题答案
一键面试function printInfo(str: string): void;
function printInfo(str: string, isUpperCase: boolean): void;
function printInfo(str: string, isUpperCase: boolean = false): void {
if (isUpperCase) {
console.log(str.toUpperCase());
} else {
console.log(str.toLowerCase());
}
}