I have a string like this

```
var element = "İstanbul";

```

and when I convert it to lower case like this:

```
var element = element.toLowerCase();

```

it becomes 

```
"istanbul"

```

I need the substring of the lower case string `"istanbul`". 

So, when I do this before the lowerCase operation

```
element.substr(0,2)

```

the output is correct

[![enter image description here](https://i.stack.imgur.com/uat9z.png)](https://i.stack.imgur.com/uat9z.png)

but when I do the following it's wrong from which I know `substr(0,2)` should give `"is"` instead of `i`

[![enter image description here](https://i.stack.imgur.com/meCZ0.png)](https://i.stack.imgur.com/meCZ0.png)

Why is it happening and how can I correct this?