-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexercicio5.html
More file actions
30 lines (30 loc) · 903 Bytes
/
exercicio5.html
File metadata and controls
30 lines (30 loc) · 903 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
<html>
<head>
<meta charset="UTF-8">
<title>Exercício 5</title>
</head>
<body>
<script>
var usuarios = [
{
nome: "Diego",
habilidades: ["Javascript", "ReactJS", "Redux"]
},
{
nome: "Paulo",
habilidades: ["VueJS", "Ruby on Rails", "Elixir"]
}
];
function temHabilidades(dados) {
var ret = [], i = 0;
for (let dado of dados) {
ret[i] = "O " + dado.nome + " possui as habilidades: " +
dado.habilidades.join(", ") + ".";
i++;
}
return ret;
};
console.log(temHabilidades(usuarios));
</script>
</body>
</html>