separated index javascript