forked from bethrobson/Head-First-JavaScript-Programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbark.html
More file actions
26 lines (23 loc) · 399 Bytes
/
bark.html
File metadata and controls
26 lines (23 loc) · 399 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bark</title>
</head>
<body>
</body>
<script>
function bark(name, weight) {
if (weight > 20) {
console.log(name + " says WOOF WOOF");
} else {
console.log(name + " says woof woof");
}
}
bark("rover", 23);
bark("spot", 13);
bark("spike", 53);
bark("lady", 17);
</script>
</body>
</html>