Used chiefly before adjectives/adverbs as an informal intensifier.
Informal, euphemistic: used as an intensifier meaning "very" or "extremely". He danged near broke his leg on the ice.
Standalone exclamation expressing annoyance, surprise, or frustration.
Informal exclamation of annoyance, surprise, or frustration. Danged! I left my wallet at home.