-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.html
22 lines (21 loc) · 1.19 KB
/
functions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
<title>JS Tutorial - Educational Websites</title>
</head>
<body>
<section>
<h1 id="intro">J<span>ava</span>S<span>crip</span>t Tu<span>tori</span>als</h1><br><br><br>
<!-- Lesson 5 -->
<h2 id="lesson-text">Lesson 5 - Functions</h2><br><br><br>
<h3 id="lesson-text2">A function is basically another program. You can call that function by doing functionName(); <br><br> in JS or add an event in a tag like onclick="functionName()". To create a function, you do function functionName(){"Code"}. You don't write the code part, you write the code where the code quote is. <br> Instead of triggering an event and writing the same code over and over again, you can write the same code once in a function and call it whenever you need it. Functions are super helpful and save a whole lot of time.</h3>
<br/>
<br/>
<a href="./arrays.html" class="green-btn">< Previous</a><span style="color:transparent;">-------------------------</span>
<a href="./document.html" class="green-btn">Next ></a>
</h3>
</section>
</body>
</html>