It forms an adjective. Danger by itself is a noun, if you add the suffix -ous, it makes it an adjective
9.5m questions
12.2m answers