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

275
Views
can't understand some javascript code : javascript

I am newbie in javascript and i need some help please my goal is to convert a csv file to an ofx , I have found an open source and i want to understand it to modify it as my requirements,

this is the function in javascript:

  // csv to ofx
  function convert(csvData, filename) {
  
    csvData = csvData.split('\n').map(row => row.trim())
  
    csvDataInfoRow1 = csvData[0].split(';');
    csvDataInfoRow2 = csvData[1].split(';');
    csvDataInfoRow4 = csvData[3].split(';');
  
    // the date at the end of the period
    let dateEnd = csvDataInfoRow1[3].substr(csvDataInfoRow1[3].length - 10).split('/');
    // the date at the beginning of the period
    let dateBeginning = csvDataInfoRow1[2].substr(csvDataInfoRow1[2].length - 10).split('/');

My Question is why the programmer add just 3 variables:

csvDataInfoRow1 = csvData[0].split(';');
csvDataInfoRow2 = csvData[1].split(';');
csvDataInfoRow4 = csvData[3].split(';');

and not more or less varibles like that , what i mean for example why he just stopped in csvDataInfoRow4 = csvData[3].split(';') and what he want to do by this instruction !; also why for example he did'nt complete another variable like : csvDataInfoRow5 = csvData[4].split(';') and so on ...

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

maybe the code was only for three line CSVs

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!