<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
function sum(){
var s=0;
for(var i=0;i<arguments.length;i++){
s+=arguments[i];
}
return s;
}
document.write("1+2=",sum(1,2));
document.write("<br />")
document.write("5+2+7=",sum(5,2,7));
</script>
</body>
</html>