Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

92
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda