Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

java script names starting with b foreach

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

const namesStartingWithB = [];

 names.forEach((name) => {
      if (name.startsWith("B") === true) {
          namesStartingWithB.push(name);
      }
  });
  console.log(namesStartingWithB)
 
PREVIOUS NEXT
Tagged: #java #script #names #starting #foreach
ADD COMMENT
Topic
Name
3+9 =