The author uses dash (-) not em dash (—), there is a big difference in that everyone has a dedicated dash/undersocore key on their keyboard, but nobody has a em dash key. You can use word processing software etc, but using em dash consistently throughout a text is very unnatural in casual written texts.
Double hyphen converts to em dash in Microsoft Word and I think some other places. I was taught that it was incorrect to use a hyphen in place of a dash, so I’ve always used em dashes -- sometimes I’ll just use two hyphens if the software doesn’t convert, like a forum :).
There is an easy shortcut for em dashes on macOS, Opt+Shift+-. This makes it really easy to use them, which I do all the time in casual settings (indeed, more often than in formal settings).