forked from johnny-rice/week-02-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
34 lines (25 loc) · 811 Bytes
/
index.html
File metadata and controls
34 lines (25 loc) · 811 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>
<html>
<head>
<title>Week 02 JS</title>
<script>
// `var` is old - use `let` instead
var currentWeather = 'Beautiful and sunny!';
let dogsName = 'Hatrick';
const isWeek02 = true;
const isWeek01 = false;
let dogsAge = '11';
let dogsAgeAsNumber = parseInt(dogsAge);
function getHumanAge (dogsAge) {
return parseInt(dogsAge) * 7;
}
let humanAge1 = getHumanAge(dogsAge);
let humanAge2 = getHumanAge(23);
let humanAge3 = getHumanAge(12);
console.log({humanAge1, humanAge2, humanAge3});
</script>
</head>
<body>
Congrats on getting to week 02!
</body>
</html>