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

172
Views
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 answers
Answer question

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 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!