Tuesday, October 4
Shadow

remove prohibited chars from string

function newName(name) { 
    return name.toLowerCase().split('').map((char) => { 
        if(['e','r','t','y','u','i','a','s','k','l','b','n','m'].find(prohibited => prohibited === char)) {
            return null;
        } 
        return char;
    }).join('');
}
    
console.log(newName("joãozinho da silva sauro"));

Leave a Reply