-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path7.2_prac.html
55 lines (41 loc) · 896 Bytes
/
7.2_prac.html
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
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<title>7 Practice</title>
</head>
<body>
<script>
// function greet(name){
// console.log(`Hello ${name}`);
// }
// greet('Rauw');
// greet('Rosalia');
// greet('Lenny');
// function greet(name){
// console.log(`Hello ${name}`);
// }
// greet();
// greet();
// greet();
// function greet(name) {
// if (!name) {
// console.log('Hi there');
// }
// else {
// console.log(`Hello ${name}`);
// }
// }
// greet('Rauw');
// greet('Rosalia');
// greet();
function convertToFahrenheit(celsius){
return ((celsius*9/5)+32);
}
console.log(convertToFahrenheit(25));
function convertToCelsius(fahrenheit){
return ((fahrenheit-32)*5/9);
}
console.log(convertToCelsius(86));
</script>
</body>
</html>