Generation

generate functionThu, 11 May 2023

una funcion que me genere hilos por cada usuario entre

const user = [ { name: 'José', age: 40, country: 'Spain' }, { name: 'Juan', age: 50, country: 'Spain' }, { name: 'Pedro', age: 20, country: 'Spain' }, { name: 'Pablo', age: 30, country: 'Spain' }, { name: 'Lucas', age: 60, country: 'Spain' }, { name: 'Adrián', age: 70, country: 'Spain' } ]; function generateUserThread(users, country) { return users .filter(user => user.country === country) .map(user => user.name); } console.log(generateUserThread(user, 'Spain'));

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant