While watching an anime, I took note of the phrase にげるんだよ！, which the character in question shouts as he is running away. From my research, the phrase can also be written as 逃げるんだよ！, but I haven't seen it as such in the native Japanese sources I searched.
I went on to analyze the sentence. にげる is a fairly straightforward translation to "run away" or "escape." However, I failed to understand the purpose of the ん character after it. だ also comes fairly straightforward, as the less polite form of です. Another particle I struggled with was the よ however, as from what I've found, it's a sentence ender that signifies the sentence contained new information or puts emphasis on it, which made little sense to me, given that the だ is already an emphasis.
My questions are:
What is the purpose of the ん character?
Did I assume correctly that the よ character is there because the speaker wanted to give the sentence additional urgency?