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

308
Views
Uncaught (en promesa) ReferenceError: renge no está definido

Tengo dificultades con esta función dentro del script svelte :

 const getRange = function (typ) { let range = 0; if (typ == 0) { range = "AB"; } else if (typ == 1) { range = "Bc"; } else if (typ == 2) { renge = "CD"; } else { range = "CD"; } return range; };

La plantilla es como:

 {#each itmes as itme} <strong> {getRange(item.typ)}</strong> <br /> {/each}

Sin embargo, recibo su error en el navegador:

 Projects.svelte:26 Uncaught (in promise) ReferenceError: renge is not defined at Array.getRange (Projects.svelte:26) at create_each_block (Projects.svelte:161) at Object.update [as p] (Projects.svelte:156) at update (index.mjs:1057) at flush (index.mjs:1025)

Me pregunto cuál es el problema aquí y cómo puedo solucionarlo.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Escribiste mal el range una vez, en la cláusula else if (typ == 2) :

 const getRange = function (typ) { let range = 0; if (typ == 0) { range = "AB"; } else if (typ == 1) { range = "Bc"; } else if (typ == 2) { range = "CD"; } else { range = "CD"; } return range; };
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!