The ordinary bold text is used for ECMAScript values, while the monospace is for source text, as specified in Section
5.2.6 Value Notation
In this specification, ECMAScript language values are displayed in bold. Examples include null, true, or "hello". These are distinguished from ECMAScript source text such as Function.prototype.apply
or let n = 42;
.
The source text is monospace in the original, while non-source language values are bold.
The sans-serif font is used for abstract enumerators; here the abstract ToPrimitive operation has as its second parameter a choice of either String or Number to specify which sort of primitive it is converting to. These are literal values, not variables or in-language expressions, so are typeset distinctly. This appears in a few places throughout the specification; they could have defined separate operations for string and number, but in places need to refer to both together and have chosen this approach.
Other conventions are also given in-document where precise meaning is required, such as for the @@wellKnownSymbol case. These are bespoke for this language specification to represent recurring concepts and mark elements as carrying all of the formal properties of those concepts.
These are all fairly typical notational conventions, though which typeface is used for what purpose varies according to taste (or which points are expected to be more common). Until fairly recently the ECMAScript specifications existed only as for-print typeset documents and used typical formal typesetting techniques. The specification is not intended for beginners to read, so eschewing these conventions to make it (perhaps) easier for them to read is not likely to take priority over precision. Amiability to markdown is also not likely to have factored in. A new language’s specification that was not made for typesetting might not use all of these, and decide to strop more words instead, but this is all still consistent with current practice for formal descriptions of languages.