Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>Sum of all arguments:</p> <p id="demo"></p> <script> function sumAll() { var i, sum = 0; for(i = 0; i < arguments.length; i++) { sum += arguments[i]; } return sum; } document.getElementById("demo").innerHTML = sumAll(1, 123, 500, 115, 44, 88); </script> </body> <!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_function_arguments_sum by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:36:21 GMT --> </html>
Result:
Try it Yourself - © w3schools.com