Slack interview question

Why is javascript a good usecase of the pub/sub model?