0
I’m doing an exercise that I’m cracking head, I have to create random emails from object array with fictitious client data, using a part of the nome
and of cpf
and I’m not getting it, someone could explain to me a way to do.
let clientes = [
{ nome: 'Kelvin Silva Sena', cpf: '10286741474', email: '[email protected]', senha: 'passw:Abcd1234' },
{ nome: 'Amyson Jhonata Da Silva', cpf: '10287054411', email: '[email protected]', senha: 'passw:Abcd1234' },
{ nome: 'Matheus Correa Da Silva', cpf: '10287259498', email: '[email protected]', senha: 'passw:Abcd1234' },
{ nome: 'Janekely Batista Dos Santos', cpf: '10288003470', email: '[email protected]', senha: 'passw:Abcd1234' },
{ nome: 'Luan Marcondes Alves De Souza', cpf: '10288469402', email: '[email protected]', senha: 'passw:Abcd1234' },
{ nome: 'Neidi Lucia Ignacio', cpf: '35331701949 ', email: '[email protected]', senha: 'passw:Abcd1234' },
{ nome: 'Neidi Lucia Ignacio ', cpf: '35331701949', email: '[email protected]', senha: 'passw:Abcd1234' },
{ nome: 'Neidi Lucia Ignacio', cpf: '35331701949', email: '[email protected]', senha: 'passw:Abcd1234' },
]
//preciso criar uma função
function gerarEmail() {
let dominios= ['@gmail.com', '@outlook.com', '@bol.com.br']
//funcao para gerar email aleatorio com partes do nome + cpf
//examplo linha 1: [email protected]
}
and what the array clients are for?
– Ricardo Pontual