javascript substr substring difference