crop_rotate
Run
<!DOCTYPE html> <html> <head> <title>Function Parameters JavaScript</title> </head> <body> <h1>Function Parameters JavaScript</h1> <script> //decleare function with 2 pramaters a,b function sum(a, b) { //Summation a,b and store result in total variable let total = a + b //print total in html document.write(total + "<br>"); } //every call with different value sum(5,10); sum(99,1); </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHRpdGxlPkZ1bmN0aW9uIFBhcmFtZXRlcnMgSmF2YVNjcmlwdDwvdGl0bGU+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPiA6Oi13ZWJraXQtc2Nyb2xsYmFye3dpZHRoOjdweDtoZWlnaHQ6N3B4O306Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNre2JhY2tncm91bmQ6I2ZmZjt9Ojotd2Via2l0LXNjcm9sbGJhci10aHVtYntib3JkZXItcmFkaXVzOjVweDtiYWNrZ3JvdW5kOiMyZjQ1ZmY7fTwvc3R5bGU+PC9oZWFkPg0KPGJvZHk+DQogICA8aDE+RnVuY3Rpb24gUGFyYW1ldGVycyBKYXZhU2NyaXB0PC9oMT4NCiAgICA8c2NyaXB0Pg0KICAgICAgIC8vZGVjbGVhcmUgZnVuY3Rpb24gd2l0aCAyIHByYW1hdGVycyBhLGINCiAgICAgICAgZnVuY3Rpb24gc3VtKGEsIGIpIHsNCiAgICAgICAgIC8vU3VtbWF0aW9uIGEsYiBhbmQgc3RvcmUgcmVzdWx0IGluIHRvdGFsIHZhcmlhYmxlDQogICAgICAgICBsZXQgdG90YWwgPSBhICsgYg0KICAgICAgICAvL3ByaW50IHRvdGFsIGluIGh0bWwgDQogICAgICAgIGRvY3VtZW50LndyaXRlKHRvdGFsICsgIjxicj4iKTsNCiAgICAgICAgfQ0KICAgICAgLy9ldmVyeSBjYWxsIHdpdGggZGlmZmVyZW50IHZhbHVlDQogICAgICBzdW0oNSwxMCk7DQogICAgICBzdW0oOTksMSk7DQogICAgPC9zY3JpcHQ+DQo8L2JvZHk+DQo8L2h0bWw+