The style of Tolkien's narration in The Hobbit is down-to-earth, chatty, and self-referential -- Tolkien often reminds readers that he has read the whole story before and knows how everything turns out. The stakes may be high, but Tolkien's narration is there to guide the reader safely through Bilbo's grand adventure. One example occurs in Chapter 10, when Tolkien describes the Elvenking's vow to stop Bilbo and the dwarves from stealing treasure back through Mirkwood:
"[...]No treasure will come back through Mirkwood without my having something to say in the matter. But I expect they will all come to a bad end, and serve them right!” He at any rate did not believe in dwarves fighting and killing dragons like Smaug, and he strongly suspected attempted burglary or something like it—which shows he was a wise elf and wiser than the men of the town, though not quite right, as we shall see in the end.
In this passage, Tolkien comments on the story as he is telling it. Instead of letting readers draw their own conclusions about the Elvenking, he decodes the character for them. Bilbo and the dwarves do intend to take the Lonely Mountain's treasure for themselves, he reminds readers. The Elvenking's suspicion thus makes him "wise" even by elven standards. Given that all elves seem to know a little more than they should, the extra-wise Elvenking's prediction of a "bad end" for the protagonists should alarm readers.
However, Tolkien also remarks that the Elvenking is "not quite right" in his prediction. This line reminds readers that the narrator knows even more than the Elvenking. After all, Tolkien has repeatedly called himself a translator; he claims to be transcribing an old story into English. Translating a story requires intense familiarity with the original. The line "as we shall see in the end" functions as a conspiratorial wink at the reader. Tolkien is not going to spoil the end of the story, but he is happy to intrude on the action to remind the reader not to fret over the Elvenking's promise. Tolkien, not the Elvenking, holds the end of the story, and he promises to let it unfold in a satisfying way.