How to write “variables” inside var? [duplicate]

I have a script on my website. I need to call to this script on several pages.

The script looks like this :

<div id="Widget12345" data-id-projet='12345'>Chargement en cours...</div>
<script type="text/javascript">
var oooWidgetUrl12345, 
    oooTypeModule12345; 
    oooWidgetUrl12345 = 'https://mybookingsystem.com/Widget12345?idoi=67890';
    constellationTypeModule12345=2; 
    constellationBookingCalendarLoadWidget12345; 
    constellationWidgetAddEvent(window, "resize", function () { 
    constellationWidgetSetAppearanceWidget12345; });</script>

In this exemple, 12345 (and also 67890) is different on every page, so I would like to include variables every time these numbers are called in my script. To have something like this (and I just would have to dynamically modify $var1 and $var2 at the top of the script) :

$var1 = 12345
$var2 = 67890

But I’m not good in javascript, and this syntax is not good 🙂

Could you help me to write it with the good syntax ?
Hope I am clear enough.
Thanks in advance for your help !