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

251
Views
Error de sintaxis: falta; antes de la declaración

Estoy recibiendo este error:

 SyntaxError: missing ; before statement

¿Por qué obtendría eso de este código? Cómo puedo evitar esto ?

 var $this = $("input"); foob_name = $this.attr('name').replace(/\[(\d+)\]/, function($0, $1) { return '[' + (+$1 + 1) + ']'; }));
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Parece que tienes un paréntesis extra.

La siguiente parte se analiza como una asignación, por lo que el intérprete/compilador buscará un punto y coma o intentará insertar uno si se cumplen ciertas condiciones.

 foob_name = $this.attr('name').replace(/\[(\d+)\]/, function($0, $1) { return '[' + (+$1 + 1) + ']'; })
over 4 years ago · Santiago Trujillo Report

0

demasiados) paréntesis eliminar uno de ellos.

over 4 years ago · Santiago Trujillo Report

0

O podría tener algo como esto (redeclarando una variable):

 var data = []; var data =
over 4 years ago · Santiago Trujillo 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!