Functions with Parameters tutorial in JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Functions with Parameters JavaScript</title>
<script>
function hello(fname = "Ram", lname = "Charan") {
document.write("Hello, " + fname + " " + lname + "<br>");
}
function sum(a, b) {
document.write(a + b + "<br>");
}
sum(34.87, 12.67);
hello("Hello", "World");
sum(20, 30);
</script>
</head>
<body>
</body>
.png)
.png)
.png)
Comments
Post a Comment