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

173
Vistas
static createXel function not working properlly

I am working on a small framework. I made it, so i can handle everything in it. I got one problem tho...

This function just wont work. I am not going to show the full code, I just want to know, if I made anything wrong within this function.

static createXel(element, attributes) {
        var htmlelement;
        if (element == "h1" 
            element == "h2" 
            element == "h3" 
            element == "h4" 
            element == "h5" 
            element == "h6") {
            htmlelement = 'HTMLHeadingElement';
        } else {
            htmlelement = HTMLElementsArr[element];
        }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I got it. I had to add "||" for it to work, so it looks like this.

   static createXel(element, attributes) {
        var htmlelement;
        if (element == "h1" ||
            element == "h2" ||
            element == "h3" ||
            element == "h4" ||
            element == "h5" ||
            element == "h6") {
            htmlelement = 'HTMLHeadingElement';
        } else {
            htmlelement = HTMLElementsArr[element];
        }
about 4 years ago · Juan Pablo Isaza Denunciar
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