Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

327
Visualizações
Method to call words greater than x length

(Firstly, I would like to apologise as I am about a week deep in Javascript (and coding)).

My code is as follows

const b = a.method(a => a.length > 7); 

Essentially I need to change method to an iteration (not sure if that's even the correct term) that will create a new variable which only returns words greater than 7 characters.

I know length is obviously checking the length, which is great.. but I'm a bit stumped.

Any idea on where I can find a list of methods with easy explanations?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Your arrow function looks correct, you just need to pass it to .filter()

var foo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
console.log(foo.filter(item => (item > 7)));
<div id="output"></div>

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda