<html>
<head>
<script language="javascript" type="text/javascript">

function test(name,subject1,subject2){
total=subject1+subject2;
avg=total/2;
a= +name+"your total is"+total+"your average is"+avg+
return (a);
}

document.write(test("tom"70,60));
document.write(test("kate"78,60));

</script>
</head>
</html>



there are some place is wrong.I can't fix it.plz help me.