Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.html
More file actions
Latest commit
34 lines (32 loc) · 950 Bytes
/
Copy pathfunction.html
File metadata and controls
34 lines (32 loc) · 950 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
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<htmllang="en">
<head>
<metacharset="UTF-8">
<metaname="viewport" content="width=device-width, initial-scale=1.0">
<title>Function - HyNusantara Academy</title>
</head>
<body>
<h1>Function - HyNusantara Academy</h1>
<p>Function pada Javascript dapat digunakan untuk mengumpulkan beberapa baris koding yang memproses dengan tujuan tertentu.</p>
<p>Perhatikan baris koding berikut!</p>
<pre>
function tes() {
let p = 10;
let l = 8;
let luas = p * l;
alert('Luas adalah ' + luas);
}
</pre>
<p>Klik <ahref="javascript:tes()">disini</a> untuk menjalankan function tersebut.</p>
<hr>
<p>Sekian materi Javascript for Beginners</p>
<script>
functiontes(){
letp=10;
letl=8;
letluas=p*l;
alert('Luas adalah '+luas);
}
</script>
</body>
</html>