Created
November 13, 2019 00:55
-
-
Save luisfelipe-dev/fdd6933c4d4e7d81990943ee2a9d916e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const usuarios = [ | |
| { nome: "Carlos", tecnologias: ["HTML", "CSS"] }, | |
| { nome: "Jasmine", tecnologias: ["JavaScript", "CSS"] }, | |
| { nome: "Tuane", tecnologias: ["HTML", "Node.js"] } | |
| ]; | |
| function listaUsuarios(users) { | |
| for (let i = 0; i < users.length; i++) { | |
| console.log(`${users[i].nome} trabalha com ${users[i].tecnologias}`); | |
| } | |
| } | |
| function checaSeUsuarioUsaCSS(usuarios) { | |
| for (let i = 0; i < usuarios.length; i++) { | |
| for (let j = 0; j < usuarios[i].tecnologias.length; j++) { | |
| if (usuarios[i].tecnologias[j] === "CSS") { | |
| console.log(`O usuário ${usuarios[i].nome} trabalha com CSS`); | |
| } | |
| } | |
| } | |
| } | |
| listaUsuarios(usuarios); | |
| checaSeUsuarioUsaCSS(usuarios); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment