const names = ['BCarlos', 'ernesto', 'BConstantino']; const namesStartingWithB = []; names.forEach((name) => { if (name.startsWith("B") === true) { namesStartingWithB.push(name); } }); console.log(namesStartingWithB)