When Cherry asks about Johnny's past, Ponyboy explains how Johnny was attacked and beaten by a group of Socs a few months earlier. As a precaution, Johnny always carries a switchblade now, which foreshadows Bob's death:
And Johnny, who was the most law-abiding of us, now carried in his back pocket a six-inch switchblade. He’d use it, too, if he ever got jumped again. They had scared him that much. He would kill the next person who jumped him. Nobody was ever going to beat him like that again. Not over his dead body . . .
The use of the hypothetical "would" creates clear insinuations about Johnny's future actions. This excerpt foreshadows not only the boys getting jumped by the Socs and the stabbing of Bob, but also Johnny’s own death with the phrase “not over his dead body.”
The example above reveals almost the entire scene in which Johnny kills Bob with a six-inch switchblade, illustrating that the author knowingly uses foreshadowing in the novel. This particular use of foreshadowing builds anticipation towards the story's trigger point: Bob's death. The killing unfolds the rest of the rising action and leads to the climax of Johnny and Dally's deaths.
When Ponyboy and Johnny hide out in an abandoned church together, Ponyboy entertains himself by smoking more than usual. With a comment about the danger of an old wooden building catching fire, the novel foreshadows the climactic church fire:
I was smoking a lot more there than I usually did—I guess because it was something to do—although Johnny warned me that I would get sick smoking so much. We were careful with our cigarettes—if that old church ever caught fire there’d be no stopping it.
As Johnny and Ponyboy hide from the police in this abandoned church and smoke cigarettes, the novel uses this moment to foreshadow the church fire that later endangers some schoolchildren and kills Johnny. The hypothetical nature of the phrasing in this passage creates a feeling of suspense and foreboding that alerts the reader that frightening events are on the horizon. The boys' circumstances are already less than ideal, so the foreshadowing of another tragedy does not go unnoticed by the reader. However, the impending fear that this phrase creates is quickly forgotten once the boys leave the church with Dally. The cigarettes only come back to haunt Ponyboy and Johnny when they pass the burning church on their way back to Tulsa.