added javascript for basic array