Load array of dates into javascript in HTML element

Hi All,

I am trying to load a list of dates from the bubble database into a JavaScript array in an HTML element. I was wondering if anyone has any experience doing this/knows if there is a proper way to do this. Essentially what I am looking to do would be as follows:

<script type="text/javascript">
  var listOfdates = [Do a search for a list of dates in the bubble database];

Right now when I am trying to do this, it is either returning an array of numbers rather than dates or giving me the following error in the console:

SyntaxError: missing ] after element list

The difference depends on which format I specify in Bubble. However, no matter which format I choose, it is never an array of Dates.

Thanks for the help

I should specify that the SyntaxError: missing ] after element list appears to be a byproduct of choosing a particular format when conducting the bubble search as I have confirmed that the right bracket is in fact there even when I am getting this error.