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

297
Views
Diferencias de ejecución de funciones anónimas asíncronas de Safari y WebKit

Ejecutar este código en Chrome y Safari sería diferente. Aviso, la función es asíncrona.

 (async function(v) { console.log(v) })('@')

Safari fuera:

 1 - '@'

Chrome fuera:

 1 - '@'

Ahora se ve bien, pero ¿y si le agregamos algo?

 (async function(v) { console.log(v) var v = v || '#'; console.log(v) })('@')

Safari fuera:

 1 - undefined 2 - '#'

Chrome fuera:

 1 - '@' 2 - '@'

Ya no se pasa V como parámetro, se anula incluso justo después de que comienza el cuerpo de la función. Parece que el operador izquierdo de Safari se ejecuta primero y reemplaza todos los parámetros pasados con los nuevos que están definidos en un ámbito. ¿Es esto un error?

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!