DEV Community

Discussion on: How to use ZeroMQ Pub/Sub Pattern in Node.js

Collapse
 
mnathani profile image
Murtaza Nathani

Wow.. this was explained amazingly..

Can you explain how does this work or maybe a link to mdn resources

for await ( [ ...] of sock )

Collapse
 
franciscomendes10866 profile image
Francisco Mendes • Edited

Thanks so much for the feedback! 😊

In the for loop I'm destructuring the socket, in this case the socket returns an array and I'm just getting the elements I want.

The For Of Loop -> bit.ly/3tLULaF
Array Destructuring -> bit.ly/3EnYXCf