added new snippet for javascript