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

162
Views
Use of undefined constant i - assumed 'i' in javascript of laravel

I am using laravel and I got this error. What I want to achieve is getting coordinator id and display it to input coordinatorname. I am using for loop to get the data but it gives error about constant 'i'. Does anyone know how to fix this?

This is my Javascript code:

function defaultcoor(course)
 {
  for(let i=0; i < {{ count($codes) }}; i++)
   {
       for(let j=0;j < {{ count($coordinators) }}; j++)
       {
          if(course ==  {{ $codes[i]->id }}  &&  {{ $coordinators[j]->staffid }} == {{ $codes[i]->coordinator_id }})
          {
            document.getElementById("coordinatorname").value = $coordinators[j]->id;
          }
       }
   }
 }
about 4 years ago · Juan Pablo Isaza
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!