-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathaula08.04.html
More file actions
42 lines (30 loc) · 915 Bytes
/
aula08.04.html
File metadata and controls
42 lines (30 loc) · 915 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
<!doctype html>
<html>
<head>
<title>Logica de Programação Javascript</title>
<meta charset="utf-8">
</head>
<body>
<h1>Lógica de programação com Javascript</h1>
</body>
<script>
function dizOla(praquem, cb){
if(typeof cb === 'function'){
return cb(praquem)
}
return console.log('ola', praquem)
}
function boaNoite(praquem){
console.log('boa noite', praquem);
}
function boaTarde(praquem){
console.log('boa tarde', praquem);
}
dizOla('maria')
dizOla('daniel', boaNoite)
dizOla('joão', boaTarde)
dizOla('ana', function(who){
console.log('bom dia', who)
})
</script>
</html>