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

241
Views
Why does let generate error but var doesnt

In Google App Script both old and new editor this causes an error

function sortSheets() {
  try {
    let ss = SpreadsheetApp.getActiveSpreadsheet();
  }
  catch(err) {
    console.log(err);
  }
}

Syntax error: Missing ; before statement. line: 16 file: Code

But this does not.

function sortSheets() {
  try {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
  }
  catch(err) {
    console.log(err);
  }
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I completely forgot about the V8 runtime. When off I get that message, obviously because the old runtime did not have let.

enter image description here

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!