-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctionsReturn.html
More file actions
34 lines (29 loc) · 905 Bytes
/
Copy pathfunctionsReturn.html
File metadata and controls
34 lines (29 loc) · 905 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 lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Função com um retorno simples</title>
<style>
div{display: flex; flex-direction: column;}
h1{margin: 25px auto; width: 100%; background-color: darkgoldenrod; text-align: center; font-size: 24px; font-family: sans-serif; color: white;}
#button{margin: 0px auto; width: 200px;font-size: 24px;}
</style>
</head>
<body>
<div>
<h1>JS: FUNÇÕES</h1>
<input type="button" id="button" value="Mostrar nome">
</div>
<script>
function singleReturn(firstName, lastName) {
return "Your first name: " + firstName + "\n" + "Your last name: " + lastName;
}
function multiReturn(firstName, lastName, age){
}
document.getElementById('button').onclick=function(){
console.log(singleReturn("Renan", "Eduardo"));
}
</script>
</body>
</html>