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

192
Views
Javascript: "Uncaught SyntaxError: Identifier starts immediately after numeric literal"

I am getting the error "Uncaught SyntaxError: Identifier starts immediately after numeric literal". As I understand, this is from the variable identifier starting with a number, which I'm trying pass through in the function. I saw here to use escape identifiers, but there was no concrete solution on how to add them in when using PHP, which I am having difficulty implementing.

Html

<button class = "btn btn-primary edButton" onclick='edit_function(\""<?php echo $var; ?>"\\")'>action</button>

Js

function edit_function(id) {
...
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

You can't start a variable in JavaScript with a digit. There is no way to escape it.

about 4 years ago · Santiago Gelvez 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!