请在 下方输入 要搜索的题目:

下列代码的输出结果是( )。function attr(name: string): string;function attr(age: number): string;function attr(nameorage: any): any { if (nameorage && typeof nameorage === "string") { //代表当前是名字 console.log("ming") } else { console.log("age"); }}attr("hello");


A、运行错误;

B、运行正确,结果为h;

C、运行正确,结果为he;

D、运行正确,结果为hello

发布时间:2025-06-15 13:46:05
推荐参考答案 ( 由 快搜搜题库 官方老师解答 )
联系客服
答案:运行正确,结果为hello
专业技术学习
专业技术学习
搜搜题库系统