How to convert the p elements into the div to a array in javascript?

What have you tried?