compare string to int javascript