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

310
Views
I am trying to print smthing infront to insert into table if the value is not empty

I want to insert a currency code in front if the value is not empty

            <td class="table-cell">`+ iLowest + `</td>
            <td class="table-cell">`+oLowest + `</td>
            <td class="table-cell">`+ bLowest+ `</td>
            <td class="table-cell">`+ sLowest+ `</td>

this is the code to get the lowest amount and should i have the currency added here or check after?

                    for (let p = 0; p < element.availableCategories.length; p++) {

                        let category = element.availableCategories[p];
                        console.log(category);
                        if(category.cabinCategory.description.includes("BALCONY") && (category.price.total < bLowest || bLowest=== "-")){
                            bLowest = category.price.total;
                        }
                        if(category.cabinCategory.description.includes("PALACE") && (category.price.total < sLowest || sLowest=== "-")){
                            sLowest = category.price.total;
                        }
                        if(category.cabinCategory.description.includes("OCEANVIEW") && (category.price.total < oLowest || oLowest=== "-")){
                            oLowest = category.price.total;
                        }
                        if(category.cabinCategory.description.includes("INTERIOR") && (category.price.total < iLowest || iLowest=== "-")){
                            iLowest = category.price.total;
                        }
                        
                    }    
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!