Pardon the mess, Play My Code is in beta!

READY TO PLAY?
CLICK TO LOG IN!

sign up - lost password

Forums

all topics

bigblind

getting a string character the same way you do with Arrays.

Why does this not work? alert("abc"[1]) ? would it be hard to implement this?

1 year ago

seb

You can use getChar() to do this

alert( "abc".getChar(1) ) More info at http://www.playmycode.com/docs/reference/core/string-class/getchar

1 year ago

bigblind

I know,

I just think it's weird that it doesn't work. I guess I've spent way too long in just python and javascript :p

1 year ago

seb

Ah, sorry.

1 year ago