Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

317
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!