I just wanna ask if I possible to hide the first false output
Heres my code,
let people = [
{name:'john'},
{name:'smith'},
{name:'jerry'},
{name:'peter'},
{name:'justine'},
{name:'rain'}];
people.map(person => {
if(person.name == 'jerry'){
console.log('jerry');
} else {
console.log('false');
}
})
output:
"false"
"false"
"jerry"
"false"
"false"
"false"
I just want to remove the first false statement before getting the value.
Thank you in advance.