-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtripler.html
More file actions
43 lines (32 loc) · 705 Bytes
/
tripler.html
File metadata and controls
43 lines (32 loc) · 705 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
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tripler</title>
</head>
<body>
<h1></h1>
<script>
var tripler = function (number) {
var answer = number * 3;
console.log(answer);
return answer;
};
var tripler2 = function (number) {
return number * 3;
};
var multiplier = function(num1, num2) {
return num1 * num2;
}
//take two numbers
var calculation = function (num1, num2) {
// take the first number and triple it
var first = tripler (num1);
//multiply that result by the second number
var answer = multiplier(first, num2);
console.log("answer", answer);
};
calculation(3, 2);
</script>
</body>
</html>