Имена скриптов Java, начинающиеся с B foreach

const names = ['BCarlos', 'ernesto', 'BConstantino'];

const namesStartingWithB = [];

 names.forEach((name) => {
      if (name.startsWith("B") === true) {
          namesStartingWithB.push(name);
      }
  });
  console.log(namesStartingWithB)
Blue Buffalo