add js str.slice & js close window & indexOf