How to use the javascript replace all feature

I take the data from the database with the following code and display it to the screen. Incoming data ',' comes with a comma. Sample : Coordinate: 38,5226900

                         // [START maps_streetview_controls]
                         function initPano() {
                             // Note: constructed panorama objects have visible: true
                             // set by default.
                             const panorama = new google.maps.StreetViewPanorama(
                                     position: { lat: <%#Eval("Latitude") %> , lng: 27.1570283 },
                                     addressControlOptions: {
                                         position: google.maps.ControlPosition.BOTTOM_CENTER,
                                     linksControl: true,
                                     panControl: true,
                                     enableCloseButton: true,

// [END maps_streetview_controls]

                                    const str = <%#Eval("Latitude") %>;
                                    const newStr = str.replace(".", ".");
<td ><asp:Label ID="Label24" runat="server" Text=":&nbsp;&nbsp;&nbsp;"><%#Eval("Latitude") %>' </asp:Label>

I am this ',' comma '.' I want to turn to the dot. After convert, I will put the converted version below into the script below. and I want it to open in a new page with a separate button. I'm trying to use the javascript replace all feature but it doesn't work.