How can I check if the contents of a variable start with something?
<p>I would like to do something like this:</p>

<pre><code>if (idCity == 'AB*') {
   //  do something
}
</code></pre>

<p>In other words. I want to check that idCity starts with the string "AB". How can I do this in Javascript?</p>
