Added snippet for javascript.