Using a single coordinates variable to select center in Google Maps JavaScript API : <p>I have a variable called coordinates that is formatted like this:</p>

<p><code>var coordinates = 'lat / lon';</code></p>

<p>I now want to extract the single lat and lon coordinate from that variable to display it as the center in a Google Maps API Map.
I have tried using slice to get the specific parts of the coordinates variable but depending on what coordinate it is the length is different, for example:</p>

<p><code>var coordinates = '49.7824 / 7.2413';</code><br>
<code>var coordinates = '8.5323 / -11.3336';</code></p>

<p>Is there any other way I could use those coordinates as the map center with the Maps API?</p>
