Python Index Method String Javascript Example