How long did it take Lady Gaga to write just dance?

10 minutes, while she was drunk. She also claims that she did not have her keys, phone and her shirt was turned inside-out. Ex: "Where are my keys? I lost my phone"