0
I need to write a function that gives me a list of the name skills in the console input.log ms can’t understand this for-of. I’m a beginner in javascript and since yesterday I’m jumping from article to article but I can’t do.
var usuarios = [
{
nome: "Diego",
habilidades: ["Javascript", "ReactJS", "Redux"]
},
{
nome: "Gabriel",
habilidades: ["VueJS", "Ruby on Rails", "Elixir"]
}
];
function funcao(nome1, nome2) {
for (nome1 of usuarios) {
return usuarios.habilidades.join();
for (nome2 of usuarios) {
return usuarios.habilidades.join();
};
};
};
console.log(funcao('Diego', 'Gabriel'));
You want me to return 2 arrays or one with all the same abilities?
– Sergio
What is the expected output for the program?
– Woss
You would know how to do using one
for
conventional?– Danizavtz
I want you to return the two lists of skills
– GheistLycis
if you’re talking about the looping is, I don’t know how it could work
– GheistLycis
this is an exercise so I would need to do with
for-of
to learn how it works– GheistLycis