-1
I want to return a method that receives a list of words and returns an array with the number of characters of the words. I tried as below, but is returning the amount of words instead of characters.
//Cria lista de palavras
var caracteres:string[] = new Array( "Celular", "Carro", "Pessoa" );
function quantidadeCaracteres( a, b )
return a + b;
}
console.log( caracteres.length );
In this case sum 1 more character in each word, would be due to the use of the comma?
– Cristiano Rocha
This by the comma.
– LeAndrade