js简单程序------那里错了
代码如下
function displayInfo(args) { var output = ""; if (typeof args.name == "string") { output += "Name:" + args.name + "\n"; } if (typeof args.age == "number") { output += "Age:" + args.age + "\n"; } alert(output);}displayInfo({ name : "Nicholas", age : 29});displayInfo({ name : "Greg";});