HOW CAN I PASS MYSQL DATA TO JS OBJECT [duplicate]

Hello im student and im working in our project its a web base quiz application we save our question and answer in mysql database using php, my question is how can i pass mysql data to Javascript object. thank you advance