默认字输出问题
<script type="text/JavaScript">
function add3(x,y,z)
{
sum = x + y +z;
document.write(x+"、"+y+"、"+z+"和:"+sum+"<br/>");
}
document.write(add3(5,8,3));
document.write(add3(7,1,4));
</script>
</head>
输出:
5、8、3和:16
undefined7、1、4和:12
undefined
为什么输出会有undefined?