Get the latest tech news
How to Use Em Dashes (–), En Dashes (–), and Hyphens (-)
Be dashing—and do it well
Like commas and parentheses, em dashes set off extra information, such as examples, explanatory or descriptive phrases, or supplemental facts. A dash often precedes the name of an author or source at the end of a quoted passage—such as an epigraph, extract, or book or film blurb—that is not part of the main text. The em dash is sometimes considered a less formal equivalent of the colon and parenthesis, but in truth it’s used in all kinds of writing, including the most formal—the choice of which mark to use is really a matter of personal preference.
Or read this on Hacker News