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

301
Views
Uncaught (in promise) ReferenceError: renge is not defined

I'm having difficulty in this funciton inside svelte script:

  const getRange = function (typ) {
    let range = 0;
    if (typ == 0) {
      range = "A-B";
    } else if (typ == 1) {
      range = "B-c";
    } else if (typ == 2) {
      renge = "C-D";
    } else {
      range = "C-D";
    }
    return range;
  };

The template is like:

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

Howerver I get his error in browser:

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)

I'm wondering what is the problem here and how can I fix it?

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

0

You misspelled range once, in the else if (typ == 2) clause:

const getRange = function (typ) {
    let range = 0;
    if (typ == 0) {
      range = "A-B";
    } else if (typ == 1) {
      range = "B-c";
    } else if (typ == 2) {
      range = "C-D";
    } else {
      range = "C-D";
    }
    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!