I really don't see the added value of that quote markdown.
It doesn't make the code easier to read, and as far as I can tell they may not even be exact copies of code snippets in the book.
The OP there is just asking what the difference between two code snippets is. Whether or not the code is quoted from a book really is irrelevant for snippets as small as these.
There are probably hundreds of books that mention var a = new Array()
vs var a = []
, for example. Should questions about declaring arrays now all be formatted with quote markup? I don't think so.
To answer a question you added in the comments:
Should code snippets copied from external sources, like a book, be quoted?
It depends on the snippet.
If it's a very specific piece of code that you'd probably only find in a specific book:
Yes, absolutely, quote and link to the source.
If it's just a "concept", or something that could be considered basic knowledge to people familiar with the programming language:
Don't bother. There's a bazillion sites out there with that code.