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

130
Views
Concatenation not working on arguments of function

I need to concat two values to pass them as argument on the Y axis value of my plot. I was able to concat them but when I pass it to my 'y' value it doesn't work. What I'm doing wrong? This code work:

switch (statement) {
        //CashFlow
        case 'changeInOperatingLiabilities':
                return (        
            <Fragment><Plot data={[{type: 'bar', x: financialItem.fiscalDateEndingValues, y: financialItem.changeInOperatingLiabilitiesValues},]}
            layout={{width: 900, height: 640, title: financialItemName}} options ={ {displaylogo: 'false'} }/></Fragment>
        );

This code doesn't work:

switch (statement) {
        //CashFlow
        case 'changeInOperatingLiabilities':
                return (        
            <Fragment><Plot data={[{type: 'bar', x: financialItem.fiscalDateEndingValues, y:''.concat('financialItem.',statement,'Values')},]}
            layout={{width: 900, height: 640, title: financialItemName}} options ={ {displaylogo: 'false'} }/></Fragment>
        );

console.log(''.concat('financialItem.',statement,'Values')) returns exactly what I expected: financialItem.changeInOperatingLiabilitiesValues

I'm trying to do this because my switch is getting too long. Thanks very much for helping

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!