Foreshadowing is a literary device in which a writer gives an advance hint of what is to come later in the story. Foreshadowing often appears at the beginning of a story, or a chapter, and it helps the reader develop expectations about the upcoming events.
A writer may implement foreshadowing in many different ways. Some of these ways include: character dialogues, plot events, and changes in setting. Even the title of a work or a chapter can act as a clue that suggests what is going to happen. Foreshadowing in fiction creates an atmosphere of suspense in a story, so that the readers are interested and want to know more.
This literary device is generally used to build anticipation in the minds of readers about what might happen next, thus adding dramatic tension to a story. Moreover, foreshadowing can make extraordinary and bizarre events appear credible, as the events are predicted beforehand so that readers are mentally prepared for them. 
This literary device is frequently adapted for use by composers of theatrical music, in the composition of operas, musicals, radio, film, television, gaming, podcast, and internet scores and underscores, and incidental music for spoken theatrical productions.
Foreshadowing is often confused with other literary techniques. Some of these techniques include:
- A "red herring", is a hint that is designed to mislead the audience. However, foreshadowing only hints at a possible outcome within the confinement of a narrative, and purposely leads readers in the right direction.
- A "flashforward" is a scene that takes the narrative forward in time from the current point of the story in literature, film, television, and other media. Foreshadowing is sometimes employed through characters' explicitly predicting the future.
By analogy to foreshadowing, the literary critic Gary Morson describes its opposite, sideshadowing. Found notably in the epic novels of Leo Tolstoy and Fyodor Dostoyevsky, it is the practice of including scenes that turn out to have no relevance to the plot. This, according to Morson, increases the verisimilitude of the fiction because the audience knows that in real life, unlike in novels, most events are in fact inconsequential. This "sense of structurelessness" invites the audience to "interpret and question the events that actually do come to pass".
- "Foreshadowing". Literarydevices.net. Retrieved December 8, 2017.
- Ulrike Spierling; Nicolas Szilas (3 December 2008). Interactive Storytelling: First Joint International Conference on Interactive Digital Storytelling, ICIDS 2008 Erfurt, Germany, November 26-29, 2008, Proceedings. Springer. p. 156. ISBN 978-3-540-89424-7.
- flash-forward - definition of flash-forward by the Free Online Dictionary, Thesaurus and Encyclopedia
- Philip Martin, The Writer's Guide to Fantasy Literature: From Dragon's Lair to Hero's Quest, p 146, ISBN 0-87116-195-8
- Morson, Gary Saul (Autumn 1998). "Sideshadowing and Tempics". New Literary History. 29 (4): 599–624. JSTOR 20057502.
- Calixto, Joshua (3 August 2015). "LET'S TALK ABOUT ROSA VAR ATTRE, THE IMPOSSIBLE ROMANCE OF THE WITCHER 3". Kill Screen. Retrieved 3 August 2015.