The phrase "and the stars came out they danced about" is a clear example of personification—the attribution of human action (dancing) to non-human entities (stars). This device animates the night sky, infusing the scene with a sense of wonder, joy, and magical vitality, as if the cosmos itself is celebrating.