Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

305
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda