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

93
Vistas
Node console logging SockJSConnection

I have an array of SockJSConnections . I want to console.log them on the server.

 if (activeSockets && activeSockets.length) {
     activeSockets.forEach(socket => console.log(`socket is ${socket} ${new Date()}`));
 }

Doing that ^ gives me an output like..."<SockJSConnection e567c62f-cfad-3d21-8cb8-21dae1e9c4a6>" though..

However, doing the same console.log in Chrome Debugger prints out the actual Objects with the metadata I want to see and not just the id.

Why is this happening and what does the <Object> syntax mean in JS ?

Edit: Seems like printing in a for of gives me what I want. No idea why it doesn't work in foreach

about 4 years ago · Juan Pablo Isaza
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