... the 'consolation' of fairy-stories has another aspect than the imaginative satisfaction of ancient desires. Far more important is the Consolation of the Happy Ending. Almost I would venture to assert that all complete fairy-stories must have it. At least I would say that Tragedy is the true form of Drama, its highest function; but the opposite is true of Fairy-story. Since we do not appear to possess a word that expresses this opposite - I will call it Eucatastrophe. The eucatastrophe tale is the true form of fairy-tale, and its highest function.
The consolation of fairy-stories, the joy of the happy ending: or more correctly of the good catastrophe, the sudden joyous 'turn' (for there is no true end to any fairy-tale): this joy, which is one of the things which fairy-stories can produce supremely well, is not essentially 'escapist', nor 'fugitive'. In this fairy-tale - or otherworld - setting, it is a sudden and miraculous grace: never to be counted on to recur. it does not deny the existence of dycastastrophe, of sorrow and failure: the possibility of these is necessary to the joy of deliverance; it denies (in the face of much evidence, if you will) universal final defeat and in so far is evangelium, giving a fleeting glimpse of Joy, Joy beyond the walls of the world, poignant as grief.
It is the mark of a good fairy-story, of the higher or more complete kind, that however wild its events, however fantastic or terrible the adventures, it can give to child or man that hears it, when the 'turn' comes, a catch of the breath, a beat and lifting of the heart, near to (or indeed accompanied by) tears, as keen as that given by any form of lterary art, and haveing a peculiar quality...
... in such stories when the sudden 'turn' comes we get a piercing glimpse of joy, and heart's desire, that for a moment passes outside the frame, rends indeed the very web of story, and lets a gleam come through.
JRR Tolkein - Tree and Leaf