-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTutorial5 Functions.html
More file actions
24 lines (23 loc) · 878 Bytes
/
Tutorial5 Functions.html
File metadata and controls
24 lines (23 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!doctype html>
<html>
<head>
<title>
Tutorial 5 JavaScript -- Function
</title>
</head>
<body>
<script type="text/javascript"> // Tag to include JavaScript in HTML.
// defining a function. Function is a keyword.
function sayHello(){
alert("Hello from function");
}
sayHello(); // Calling a function.
/* Take Aways: - JavaScript has the means to parcel up parts of your code into reusable modules, called function.
- keyword "function" must be in lower case.
- defination n calling both are important.
- You can define one function one time and use it again and again.
- alert will just give a pop up to user.
*/
</script>
</body>
</html>