Posts

Showing posts from November 19, 2018

Brandy Norwood

Image
Brandy Brandy em 2011 Informação geral Nome completo Brandy Rayanna Norwood Também conhecido(a) como B-Rocka, Bran'Nu Nascimento 11 de fevereiro de 1979 (39 anos) Local de nascimento McComb, Mississipi  Estados Unidos Gênero(s) R&B, Pop, Soul, Hip-hop [ 1 ] Ocupação(ões) Cantora, Atriz, Compositora, Produtora Musical, Produtora de TV, Empresária Instrumento(s) Vocal Período em atividade 1990-presente Gravadora(s) Atlantic Records (1993–2005) Knockout Entertainment (2005-2008) Epic Records (2008-2009) RCA (2011-2015) eOne Music (2017-presente) Afiliação(ões) Ray J, Snoop Dogg, Monica Influência(s) Whitney Houston, Toni Braxton, Mariah Carey, Janet Jackson, The Fugees Página oficial ForeverBrandy.com ...

Return the first word with the greatest number of repeated letters

Image
up vote 0 down vote favorite I'm learning javascript and have written a function that accepts a string and returns the first word with the greatest number of repeated letters. For example: Input:"Hello apple pie" - Output:"Hello" Input:"Hello apple pie yelllow" - Output:"yelllow" I've tried to keep it as concise as possible. I wonder whether later on in the code it starts to become more verbose. The answer it returns seems to be correct for all tests. Could someone give some advice about improving my code? Or is it not bad? And any tips about improving readability? Thanks for any help here. function whichWord(str) { // 1. split into array with words - EG if var str = "wodrd sy hello"; var arr = str.split(' '); // puts str into array ["wodrd", ...