-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusersTechs.js
More file actions
50 lines (42 loc) · 982 Bytes
/
usersTechs.js
File metadata and controls
50 lines (42 loc) · 982 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
43
44
45
46
47
48
49
50
const users = [
{
name: 'Carlos',
techs: [
'HTML','CSS'
]
},
{
name: 'Jasmine',
techs: [
'JavaScript','CSS'
]
},
{
name: 'Tuane',
techs: [
'HTML','Node.js'
]
}
]
function searchForUsersCSS(user){
for(let i = 0; i < user.length; i++){
let objectTechs = user[i].techs
user[i].workCSS = false
for (let x = 0; x < objectTechs.length; x++){
if (objectTechs[x] === 'CSS'){
user[i].workCSS = true
};
};
};
};
function workWithCSS(program){
searchForUsersCSS(program)
for (let i = 0; i < program.length; i++ ){
if(program[i].workCSS){
console.log(`NOME: ${program[i].name} ---> TRABALHA COM CSS!`);
} else{
console.log(`NOME: ${program[i].name} ---> "NÃO" TRABALHA COM CSS!`);
};
}
};
workWithCSS(users);