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

91
Views
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
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!