Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

162
Vistas
what is the meaning of ({ a } = b); in javascript?
let b = { a: 123123123 };
try {
  ({ a } = b); <<< what is the meaning of () 

} catch (error) {}
console.log({'a':a})

why this script work, what is the meaning of () in try-catch .

the { a } = b is wrong but ({ a } = b) is correct and the variable will go out of try-catch and give new value to a.

if there are a function in () may be a IIFE, if in expressions the () is a Grouping operator.and in my example,what is the meaning of ()

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

A pair of parenthesis force the contents to be treated as an expression instead of a statement.

This causes the { to be seen at the start of an object or dereferencing structure (the latter in this case) instead of a block.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda