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

73
Views
How do I find the placement of the first instance that the arrays string turns from A to D?

This is what I tried below but I can't figure this one out?

I tried several different approaches and seems like I'm missing a small piece of code to figure it out. I was thinking maybe to us If and break when it doesn't equal A and equals D but then how would I count in the array when this happened?

const testing = [`aTest`, ` aFun`, `aYay`, `      dFun  `, ,];

let firstLetterChangeAToD;
let firstLetter;
let testingArrayWord;
let largestWord;

for (let i = 0; i <= Object.keys(testing).length; i++) {
    testingArrayWord = testing[`${i}`].trim();
    firstLetter = testingArrayWord.charAt(0);
    console.log(firstLetter);
}
about 4 years ago · Juan Pablo Isaza
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!