Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercicicos aula a018 #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion exercicio1/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,32 @@ const objeto = {
profissao: "Dev das estrelas",
username: "astrodev_labenu",
senha: "melhorDeTodos"
}
}
//Exercicio 1
const func1 = () => {
for(let propriedade in objeto){
console.log(objeto[propriedade].toUpperCase())
}
}
func1(objeto)
//----------
//Exercicio 2
const func2 = (teste) => {
const arrayDoObjeto = []
for(let propriedade in objeto){
arrayDoObjeto.push(objeto[propriedade])
}
return arrayDoObjeto.join()
}
console.log(func2(objeto))
//-----------
//exercicio 3
const func3 = (func1, func2) => {
for(let propriedade in objeto){
console.log(objeto[propriedade].toUpperCase())
}
let resultadoFinal = func2(func1)
return resultadoFinal
}

console.log(func3(func1, func2))
18 changes: 18 additions & 0 deletions exercicio2/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const arrayNumeros = [1,2,3,4,5,6,7,8]
const funcaoNumerosMultPor3 = arrayNumeros.map((numeros) => {
const novoArray = []
for(let multi of numeros) {
novoArray.push(multi * 3)
}
console.log(novoArray)
})
novoArray()




// console.log(funcaoNumerosMultPor3())

// const funcaoNumerosDivPor2 = arrayNumeros.map((numeros2) => {

// })